upd: RevEng v1.5.3

This commit is contained in:
iceman1001 2018-07-29 07:37:23 +02:00
parent 1dd01fd738
commit 513d0aca44
12 changed files with 431 additions and 420 deletions

View file

@ -48,7 +48,7 @@ int CmdCrc(const char *Cmd)
char *argv[MAX_ARGS];
int argc = split(Cmd2, argv);
if (argc == 3 && memcmp(argv[1],"-g",2)==0) {
if (argc == 3 && memcmp(argv[1], "-g", 2) == 0) {
CmdrevengSearch(argv[2]);
} else {
reveng_main(argc, argv);
@ -56,8 +56,7 @@ int CmdCrc(const char *Cmd)
for(int i = 0; i < argc; ++i) {
free(argv[i]);
}
return 0;
return 0;
}
//returns array of model names and the count of models returning
@ -396,13 +395,16 @@ char *SwapEndianStr(const char *inStr, const size_t len, const uint8_t blockSize
// takes hex string in and searches for a matching result (hex string must include checksum)
int CmdrevengSearch(const char *Cmd){
#define NMODELS 103
char inHexStr[100] = {0x00};
int dataLen = param_getstr(Cmd, 0, inHexStr, sizeof(inHexStr));
if (dataLen < 4) return 0;
// these two arrays, must match preset size.
char *Models[102];
uint8_t width[102] = {0};
char *Models[NMODELS];
uint8_t width[NMODELS] = {0};
int count = 0;
uint8_t crcChars = 0;

View file

@ -28,8 +28,6 @@
#include "ui.h"
#include "util.h"
extern int CmdCrc(const char *Cmd);
extern int CmdrevengSearch(const char *Cmd);

View file

@ -1,6 +1,7 @@
//-----------------------------------------------------------------------------
// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
//
// Modified 2018 iceman <iceman at iuse.se>
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
// at your option, any later version. See the LICENSE.txt file for the text of
// the license.
@ -32,14 +33,14 @@ static command_t CommandTable[] = {
{"hf", CmdHF, 1, "{ High Frequency commands... }"},
{"hw", CmdHW, 1, "{ Hardware commands... }"},
{"lf", CmdLF, 1, "{ Low Frequency commands... }"},
{"reveng", CmdRev, 1, "{ Crc calculations from the software reveng 1.51... }"},
{"reveng", CmdRev, 1, "{ Crc calculations from the software reveng 1.53... }"},
{"script", CmdScript, 1, "{ Scripting commands }"},
{"trace", CmdTrace, 1, "{ Trace manipulation... }"},
#ifdef WITH_FLASH
{"mem", CmdFlashMem, 1, "{ RDV40, Flash Memory manipulation... }"},
#endif
#ifdef WITH_SMARTCARD
{"sc", CmdSmartcard, 1, "{ RDV40, Smart card ISO7816 commands... }"},
{"sc", CmdSmartcard, 1, "{ RDV40, Smart card ISO7816 commands... }"},
#endif
{"quit", CmdQuit, 1, ""},
{"exit", CmdQuit, 1, "Exit program"},

View file

@ -1,9 +1,9 @@
/* bmpbit.c
* Greg Cook, 7/Feb/2017
* Greg Cook, 26/Jul/2018
*/
/* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
* Gregory Cook
*
* This file is part of CRC RevEng.

View file

@ -1,9 +1,9 @@
/* cli.c
* Greg Cook, 19/Feb/2017
* Greg Cook, 26/Jul/2018
*/
/* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
* Gregory Cook
*
* This file is part of CRC RevEng.
@ -22,7 +22,8 @@
* along with CRC RevEng. If not, see <https://www.gnu.org/licenses/>.
*/
/* 2017-02-18: -G ignored if R_HAVEP
/* 2018-07-26: NOFORCE renamed ALWPCK
* 2017-02-18: -G ignored if R_HAVEP
* 2017-02-05: added -G
* 2016-06-27: -P sets width like -k
* 2015-04-03: added -z
@ -135,7 +136,7 @@ int reveng_main(int argc, char *argv[]) {
mode = c;
break;
case 'F': /* F skip preset model check pass */
#ifndef NOFORCE
#ifndef ALWPCK
uflags |= C_NOPCK;
#endif
break;
@ -507,7 +508,6 @@ void
uerror(const char *msg) {
/* Callback function to report fatal errors */
fprintf(stderr, "%s: %s\n", myname, msg);
return;
//exit(EXIT_FAILURE);
}
@ -581,9 +581,8 @@ usage(void) {
fputs(myname, stderr);
fprintf(stderr,
"\t-cdDesvhu? [-bBfFGlLMrStVXyz]\n"
"\t\t[-a BITS] [-A OBITS] [-i INIT] [-k KPOLY] [-m MODEL]\n"
"\t\t[-p POLY] [-P RPOLY] [-q QPOLY] [-w WIDTH] [-x XOROUT]\n"
"\t\t[STRING...]\n"
"\t\t[-a BITS] [-A OBITS] [-i INIT] [-k KPOLY] [-m MODEL] [-p POLY]\n"
"\t\t[-p POLY] [-P RPOLY] [-q QPOLY] [-w WIDTH] [-x XOROUT] [STRING...]\n"
"Options:\n"
"\t-a BITS\t\tbits per character (1 to %d)\n"
"\t-A OBITS\tbits per output character (1 to %d)\n"
@ -611,7 +610,8 @@ usage(void) {
"\t-c calculate CRCs\t\t-d dump algorithm parameters\n"
"\t-D list preset algorithms\t-e echo (and reformat) input\n"
"\t-s search for algorithm\t\t-v calculate reversed CRCs\n"
"\t-g search for alg given hex+crc\t-h | -u | -? show this help\n"
"\t-g search for alg given hex+crc\n"
"\t-h | -u | -? show this help\n"
"Common Use Examples:\n"
"\t reveng -g 01020304e3\n"
"\t Searches for a known/common crc preset that computes the crc\n"
@ -625,7 +625,8 @@ usage(void) {
"\t Outputs a list of all known/common crc models with their\n"
"\t preset values\n"
"\n"
"Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Gregory Cook\n"
"Copyright (C)\n"
"2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Gregory Cook\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
"Version "

View file

@ -1,9 +1,9 @@
/* config.h
* Greg Cook, 7/Feb/2017
* Greg Cook, 26/Jul/2018
*/
/* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
* Gregory Cook
*
* This file is part of CRC RevEng.
@ -52,10 +52,10 @@
/* #define BMPMACRO 1 */
/* Some enterprise users may wish to disable the -F switch to minimise CPU
* usage. To do this, define the macro NOFORCE.
* usage. To do this, define the macro ALWPCK.
*/
/* #define NOFORCE 1 */
/* #define ALWPCK 1 */
/* Define PRESETS to compile CRC RevEng with the preset models from the
* CRC Catalogue. This implies BMPMACRO and so makes the code platform-

View file

@ -1,9 +1,9 @@
/* model.c
* Greg Cook, 19/Feb/2017
* Greg Cook, 26/Jul/2018
*/
/* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
* Gregory Cook
*
* This file is part of CRC RevEng.

View file

@ -1,9 +1,9 @@
/* poly.c
* Greg Cook, 7/Feb/2017
* Greg Cook, 26/Jul/2018
*/
/* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
* Gregory Cook
*
* This file is part of CRC RevEng.
@ -22,7 +22,8 @@
* along with CRC RevEng. If not, see <https://www.gnu.org/licenses/>.
*/
/* 2016-06-27: pcmp() shortcut returns 0 when pointers identical
/* 2017-11-28: added braces, redundant statement skipped in prev()
* 2016-06-27: pcmp() shortcut returns 0 when pointers identical
* 2015-07-29: discard leading $, &, 0x from argument to strtop()
* 2015-04-03: added direct mode to strtop()
* 2014-01-11: added LOFS(), RNDUP()
@ -807,9 +808,10 @@ prev(poly_t *poly) {
*poly->bitmap = rev(*poly->bitmap >> ofs, (int) poly->length) << ofs;
return;
}
/* claim remaining bits of last word (as we use public function pshift()) */
poly->length = fulllength;
}
/* claim remaining bits of last word (as we use public function pshift()) */
poly->length = fulllength;
/* reverse and swap words in the array, leaving it right-justified */
while(leftidx < rightidx) {

View file

@ -1,9 +1,9 @@
/* preset.c
* Greg Cook, 19/Jun/2017
* Greg Cook, 26/Jul/2018
*/
/* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
* Gregory Cook
*
* This file is part of CRC RevEng.
@ -22,7 +22,9 @@
* along with CRC RevEng. If not, see <https://www.gnu.org/licenses/>.
*/
/* 2017-06-19: added CRC-8/BLUETOOTH, CRC-17/CAN-FD, CRC-21/CAN-FD
/* 2018-07-26: added CRC-24/OS-9
* 2018-07-26: struct malias.name declared const char *const
* 2017-06-19: added CRC-8/BLUETOOTH, CRC-17/CAN-FD, CRC-21/CAN-FD
* 2017-02-18: added 8 new GSM algorithms
* 2017-02-06: munpack() produces canonical models
* 2017-02-05: added magic field
@ -83,7 +85,7 @@ struct mpreset {
};
struct malias {
const char *name; /* name of alias */
const char *const name; /* name of alias */
const struct mpreset *const model; /* corresponding model */
};
@ -289,176 +291,178 @@ static const bmp_t b32[] = {
BMP_C(0x1edc6f41) << (BMP_BIT - 32), /* 30 -- 32,1edc6f41 */
BMP_C(0x1f23b800) << (BMP_BIT - 32), /* 31 -- 24, 1f23b8 */
BMP_C(0x20000000) << (BMP_BIT - 32), /* 32 -- 4, 2 */
BMP_C(0x20140000) << (BMP_BIT - 32), /* 33 -- 14, 0805 */
BMP_C(0x20b40000) << (BMP_BIT - 32), /* 34 -- 14, 082d */
BMP_C(0x20fe0000) << (BMP_BIT - 32), /* 35 -- 16, 20fe */
BMP_C(0x21890000) << (BMP_BIT - 32), /* 36 -- 16, 2189 */
BMP_C(0x21cf0200) << (BMP_BIT - 32), /* 37 -- 24, 21cf02 */
BMP_C(0x23ef5200) << (BMP_BIT - 32), /* 38 -- 24, 23ef52 */
BMP_C(0x25000000) << (BMP_BIT - 32), /* 39 -- 8, 25 */
BMP_C(0x26000000) << (BMP_BIT - 32), /* 40 -- 8, 26 */
BMP_C(0x26b10000) << (BMP_BIT - 32), /* 41 -- 16, 26b1 */
BMP_C(0x27818000) << (BMP_BIT - 32), /* 42 -- 17, 04f03 */
BMP_C(0x27d00000) << (BMP_BIT - 32), /* 43 -- 13, 04fa */
BMP_C(0x28000000) << (BMP_BIT - 32), /* 44 -- 5, 05 */
BMP_C(0x29b10000) << (BMP_BIT - 32), /* 45 -- 16, 29b1 */
BMP_C(0x2f000000) << (BMP_BIT - 32), /* 46 -- 8, 2f */
BMP_C(0x30000000) << (BMP_BIT - 32), /* 47 -- 4, 3/ 5, 6 */
BMP_C(0x3010bf7f) << (BMP_BIT - 32), /* 48 -- 32,3010bf7f */
BMP_C(0x31000000) << (BMP_BIT - 32), /* 49 -- 8, 31 */
BMP_C(0x31800000) << (BMP_BIT - 32), /* 50 -- 10, 0c6 */
BMP_C(0x31c30000) << (BMP_BIT - 32), /* 51 -- 16, 31c3 */
BMP_C(0x328b6300) << (BMP_BIT - 32), /* 52 -- 24, 328b63 */
BMP_C(0x34000000) << (BMP_BIT - 32), /* 53 -- 6, 0d */
BMP_C(0x340bc6d9) << (BMP_BIT - 32), /* 54 -- 32,340bc6d9 */
BMP_C(0x37000000) << (BMP_BIT - 32), /* 55 -- 8, 37 */
BMP_C(0x38000000) << (BMP_BIT - 32), /* 56 -- 5, 07 */
BMP_C(0x39000000) << (BMP_BIT - 32), /* 57 -- 8, 39 */
BMP_C(0x3d650000) << (BMP_BIT - 32), /* 58 -- 16, 3d65 */
BMP_C(0x3e000000) << (BMP_BIT - 32), /* 59 -- 8, 3e */
BMP_C(0x40000000) << (BMP_BIT - 32), /* 60 -- 3, 2 */
BMP_C(0x42000000) << (BMP_BIT - 32), /* 61 -- 8, 42 */
BMP_C(0x44c20000) << (BMP_BIT - 32), /* 62 -- 16, 44c2 */
BMP_C(0x45270551) << (BMP_BIT - 32), /* 63 -- 32,45270551 */
BMP_C(0x48000000) << (BMP_BIT - 32), /* 64 -- 5, 09 */
BMP_C(0x49000000) << (BMP_BIT - 32), /* 65 -- 8, 49 */
BMP_C(0x4a800000) << (BMP_BIT - 32), /* 66 -- 10, 12a */
BMP_C(0x4acc0000) << (BMP_BIT - 32), /* 67 -- 15, 2566 */
BMP_C(0x4b000000) << (BMP_BIT - 32), /* 68 -- 8, 4b */
BMP_C(0x4b370000) << (BMP_BIT - 32), /* 69 -- 16, 4b37 */
BMP_C(0x4c000000) << (BMP_BIT - 32), /* 70 -- 6, 13 */
BMP_C(0x4c060000) << (BMP_BIT - 32), /* 71 -- 16, 4c06 */
BMP_C(0x53000000) << (BMP_BIT - 32), /* 72 -- 8, 53 */
BMP_C(0x55000000) << (BMP_BIT - 32), /* 73 -- 8, 55 */
BMP_C(0x55555500) << (BMP_BIT - 32), /* 74 -- 24, 555555 */
BMP_C(0x59350000) << (BMP_BIT - 32), /* 75 -- 16, 5935 */
BMP_C(0x5d380000) << (BMP_BIT - 32), /* 76 -- 16, 5d38 */
BMP_C(0x5d400000) << (BMP_BIT - 32), /* 77 -- 10, 175 */
BMP_C(0x5d6dcb00) << (BMP_BIT - 32), /* 78 -- 24, 5d6dcb */
BMP_C(0x60000000) << (BMP_BIT - 32), /* 79 -- 3, 3 */
BMP_C(0x60e00000) << (BMP_BIT - 32), /* 80 -- 11, 307 */
BMP_C(0x63d00000) << (BMP_BIT - 32), /* 81 -- 16, 63d0 */
BMP_C(0x64000000) << (BMP_BIT - 32), /* 82 -- 6, 19 */
BMP_C(0x66400000) << (BMP_BIT - 32), /* 83 -- 10, 199 */
BMP_C(0x66c50000) << (BMP_BIT - 32), /* 84 -- 16, 66c5 */
BMP_C(0x6f630000) << (BMP_BIT - 32), /* 85 -- 16, 6f63 */
BMP_C(0x6f910000) << (BMP_BIT - 32), /* 86 -- 16, 6f91 */
BMP_C(0x70000000) << (BMP_BIT - 32), /* 87 -- 4, 7 */
BMP_C(0x70a00000) << (BMP_BIT - 32), /* 88 -- 11, 385 */
BMP_C(0x755b0000) << (BMP_BIT - 32), /* 89 -- 16, 755b */
BMP_C(0x765e7680) << (BMP_BIT - 32), /* 90 -- 32,765e7680 */
BMP_C(0x76c20800) << (BMP_BIT - 32), /* 91 -- 32, 0ed841 */
BMP_C(0x7979bd00) << (BMP_BIT - 32), /* 92 -- 24, 7979bd */
BMP_C(0x7e000000) << (BMP_BIT - 32), /* 93 -- 8, 7e */
BMP_C(0x80000000) << (BMP_BIT - 32), /* 94 -- 3, 4 */
BMP_C(0x80006300) << (BMP_BIT - 32), /* 95 -- 24, 800063 */
BMP_C(0x80050000) << (BMP_BIT - 32), /* 96 -- 16, 8005 */
BMP_C(0x800d0000) << (BMP_BIT - 32), /* 97 -- 16, 800d */
BMP_C(0x80b40000) << (BMP_BIT - 32), /* 98 -- 14, 202d */
BMP_C(0x80c2e71c) << (BMP_BIT - 32), /* 99 -- 30,2030b9c7 */
BMP_C(0x80f00000) << (BMP_BIT - 32), /* 100 -- 12, 80f */
BMP_C(0x814141ab) << (BMP_BIT - 32), /* 101 -- 32,814141ab */
BMP_C(0x8144c800) << (BMP_BIT - 32), /* 102 -- 21, 102899 */
BMP_C(0x864cfb00) << (BMP_BIT - 32), /* 103 -- 24, 864cfb */
BMP_C(0x87315576) << (BMP_BIT - 32), /* 104 -- 32,87315576 */
BMP_C(0x89ec0000) << (BMP_BIT - 32), /* 105 -- 16, 89ec */
BMP_C(0x8a000000) << (BMP_BIT - 32), /* 106 -- 7, 45 */
BMP_C(0x8b320000) << (BMP_BIT - 32), /* 107 -- 15, 4599 */
BMP_C(0x8bb70000) << (BMP_BIT - 32), /* 108 -- 16, 8bb7 */
BMP_C(0x8cc00000) << (BMP_BIT - 32), /* 109 -- 10, 233 */
BMP_C(0x904cddbf) << (BMP_BIT - 32), /* 110 -- 32,904cddbf */
BMP_C(0x906e0000) << (BMP_BIT - 32), /* 111 -- 16, 906e */
BMP_C(0x94000000) << (BMP_BIT - 32), /* 112 -- 8, 94 */
BMP_C(0x97000000) << (BMP_BIT - 32), /* 113 -- 8, 97 */
BMP_C(0x98000000) << (BMP_BIT - 32), /* 114 -- 6, 26 */
BMP_C(0x9b000000) << (BMP_BIT - 32), /* 115 -- 8, 9b */
BMP_C(0x9c000000) << (BMP_BIT - 32), /* 116 -- 6, 27 */
BMP_C(0x9d5e4de2) << (BMP_BIT - 32), /* 117 -- 31,4eaf26f1 */
BMP_C(0x9e000000) << (BMP_BIT - 32), /* 118 -- 7, 4f */
BMP_C(0x9ecf0000) << (BMP_BIT - 32), /* 119 -- 16, 9ecf */
BMP_C(0xa0970000) << (BMP_BIT - 32), /* 120 -- 16, a097 */
BMP_C(0xa1000000) << (BMP_BIT - 32), /* 121 -- 8, a1 */
BMP_C(0xa3660000) << (BMP_BIT - 32), /* 122 -- 16, a366 */
BMP_C(0xa6000000) << (BMP_BIT - 32), /* 123 -- 7, 53 */
BMP_C(0xa7000000) << (BMP_BIT - 32), /* 124 -- 8, a7 */
BMP_C(0xa8000000) << (BMP_BIT - 32), /* 125 -- 5, 15 */
BMP_C(0xa8190000) << (BMP_BIT - 32), /* 126 -- 16, a819 */
BMP_C(0xa833982b) << (BMP_BIT - 32), /* 127 -- 32,a833982b */
BMP_C(0xabcdef00) << (BMP_BIT - 32), /* 128 -- 24, abcdef */
BMP_C(0xac000000) << (BMP_BIT - 32), /* 129 -- 8, ac */
BMP_C(0xaee70000) << (BMP_BIT - 32), /* 130 -- 16, aee7 */
BMP_C(0xb0000000) << (BMP_BIT - 32), /* 131 -- 4, b */
BMP_C(0xb0010000) << (BMP_BIT - 32), /* 132 -- 16, b001 */
BMP_C(0xb2aa0000) << (BMP_BIT - 32), /* 133 -- 16, b2aa */
BMP_C(0xb3400000) << (BMP_BIT - 32), /* 134 -- 12, b34 */
BMP_C(0xb42d8000) << (BMP_BIT - 32), /* 135 -- 17, 1685b */
BMP_C(0xb4600000) << (BMP_BIT - 32), /* 136 -- 11, 5a3 */
BMP_C(0xb4c80000) << (BMP_BIT - 32), /* 137 -- 16, b4c8 */
BMP_C(0xb4f3e600) << (BMP_BIT - 32), /* 138 -- 24, b4f3e6 */
BMP_C(0xb704ce00) << (BMP_BIT - 32), /* 139 -- 24, b704ce */
BMP_C(0xb798b438) << (BMP_BIT - 32), /* 140 -- 32,b798b438 */
BMP_C(0xbb3d0000) << (BMP_BIT - 32), /* 141 -- 16, bb3d */
BMP_C(0xbc000000) << (BMP_BIT - 32), /* 142 -- 6,2f/ 8,bc */
BMP_C(0xbd0be338) << (BMP_BIT - 32), /* 143 -- 32,bd0be338 */
BMP_C(0xbdf40000) << (BMP_BIT - 32), /* 144 -- 16, bdf4 */
BMP_C(0xbf050000) << (BMP_BIT - 32), /* 145 -- 16, bf05 */
BMP_C(0xc0000000) << (BMP_BIT - 32), /* 146 -- 3, 6 */
BMP_C(0xc2000000) << (BMP_BIT - 32), /* 147 -- 7, 61 */
BMP_C(0xc25a5600) << (BMP_BIT - 32), /* 148 -- 24, c25a56 */
BMP_C(0xc2b70000) << (BMP_BIT - 32), /* 149 -- 16, c2b7 */
BMP_C(0xc2b80000) << (BMP_BIT - 32), /* 150 -- 14, 30ae */
BMP_C(0xc4000000) << (BMP_BIT - 32), /* 151 -- 8, c4 */
BMP_C(0xc6c60000) << (BMP_BIT - 32), /* 152 -- 16, c6c6 */
BMP_C(0xc704dd7b) << (BMP_BIT - 32), /* 153 -- 32,c704dd7b */
BMP_C(0xc8000000) << (BMP_BIT - 32), /* 154 -- 5, 19 */
BMP_C(0xc8670000) << (BMP_BIT - 32), /* 155 -- 16, c867 */
BMP_C(0xcbf43926) << (BMP_BIT - 32), /* 156 -- 32,cbf43926 */
BMP_C(0xcde70300) << (BMP_BIT - 32), /* 157 -- 24, cde703 */
BMP_C(0xce3c0000) << (BMP_BIT - 32), /* 158 -- 16, ce3c */
BMP_C(0xd0000000) << (BMP_BIT - 32), /* 159 -- 8, d0 */
BMP_C(0xd02a0000) << (BMP_BIT - 32), /* 160 -- 15, 6815 */
BMP_C(0xd0db0000) << (BMP_BIT - 32), /* 161 -- 16, d0db */
BMP_C(0xd3100000) << (BMP_BIT - 32), /* 162 -- 12, d31 */
BMP_C(0xd3be9568) << (BMP_BIT - 32), /* 163 -- 30,34efa55a */
BMP_C(0xd4d00000) << (BMP_BIT - 32), /* 164 -- 12, d4d */
BMP_C(0xd5000000) << (BMP_BIT - 32), /* 165 -- 8, d5 */
BMP_C(0xd64e0000) << (BMP_BIT - 32), /* 166 -- 16, d64e */
BMP_C(0xda000000) << (BMP_BIT - 32), /* 167 -- 8, da */
BMP_C(0xdaf00000) << (BMP_BIT - 32), /* 168 -- 12, daf */
BMP_C(0xdebb20e3) << (BMP_BIT - 32), /* 169 -- 32,debb20e3 */
BMP_C(0xdf000000) << (BMP_BIT - 32), /* 170 -- 8, df */
BMP_C(0xe0000000) << (BMP_BIT - 32), /* 171 -- 3, 7 */
BMP_C(0xe3069283) << (BMP_BIT - 32), /* 172 -- 32,e3069283 */
BMP_C(0xe3940000) << (BMP_BIT - 32), /* 173 -- 16, e394 */
BMP_C(0xe5cc0000) << (BMP_BIT - 32), /* 174 -- 16, e5cc */
BMP_C(0xe7a80000) << (BMP_BIT - 32), /* 175 -- 13, 1cf5 */
BMP_C(0xe8000000) << (BMP_BIT - 32), /* 176 -- 6, 3a */
BMP_C(0xea000000) << (BMP_BIT - 32), /* 177 -- 7, 75 */
BMP_C(0xea820000) << (BMP_BIT - 32), /* 178 -- 16, ea82 */
BMP_C(0xec000000) << (BMP_BIT - 32), /* 179 -- 6, 3b */
BMP_C(0xf0000000) << (BMP_BIT - 32), /* 180 -- 4, f */
BMP_C(0xf0b80000) << (BMP_BIT - 32), /* 181 -- 16, f0b8 */
BMP_C(0xf1300000) << (BMP_BIT - 32), /* 182 -- 12, f13 */
BMP_C(0xf4000000) << (BMP_BIT - 32), /* 183 -- 8, f4 */
BMP_C(0xf4acfb13) << (BMP_BIT - 32), /* 184 -- 32,f4acfb13 */
BMP_C(0xf5b00000) << (BMP_BIT - 32), /* 185 -- 12, f5b */
BMP_C(0xf6400000) << (BMP_BIT - 32), /* 186 -- 10, 3d9 */
BMP_C(0xf8000000) << (BMP_BIT - 32), /* 187 -- 5, 1f */
BMP_C(0xfc000000) << (BMP_BIT - 32), /* 188 -- 6, 3f */
BMP_C(0xfc891918) << (BMP_BIT - 32), /* 189 -- 32,fc891918 */
BMP_C(0xfd000000) << (BMP_BIT - 32), /* 190 -- 8, fd */
BMP_C(0xfe000000) << (BMP_BIT - 32), /* 191 -- 7, 7f */
BMP_C(0xfedcba00) << (BMP_BIT - 32), /* 192 -- 24, fedcba */
BMP_C(0xfee80000) << (BMP_BIT - 32), /* 193 -- 16, fee8 */
BMP_C(0xff000000) << (BMP_BIT - 32), /* 194 -- 8, ff */
BMP_C(0xffc00000) << (BMP_BIT - 32), /* 195 -- 10, 3ff */
BMP_C(0xfff00000) << (BMP_BIT - 32), /* 196 -- 12, fff */
BMP_C(0xfffc0000) << (BMP_BIT - 32), /* 197 -- 14, 3fff */
BMP_C(0xffff0000) << (BMP_BIT - 32), /* 198 -- 16, ffff */
BMP_C(0xffffff00) << (BMP_BIT - 32), /* 199 -- 24, ffffff */
BMP_C(0xfffffffc) << (BMP_BIT - 32), /* 200 -- 30,3fffffff */
BMP_C(0xfffffffe) << (BMP_BIT - 32), /* 201 -- 31,7fffffff */
BMP_C(0xffffffff) << (BMP_BIT - 32), /* 202 -- 32,ffffffff */
BMP_C(0x200fa500) << (BMP_BIT - 32), /* 33 -- 24, 200fa5 */
BMP_C(0x20140000) << (BMP_BIT - 32), /* 34 -- 14, 0805 */
BMP_C(0x20b40000) << (BMP_BIT - 32), /* 35 -- 14, 082d */
BMP_C(0x20fe0000) << (BMP_BIT - 32), /* 36 -- 16, 20fe */
BMP_C(0x21890000) << (BMP_BIT - 32), /* 37 -- 16, 2189 */
BMP_C(0x21cf0200) << (BMP_BIT - 32), /* 38 -- 24, 21cf02 */
BMP_C(0x23ef5200) << (BMP_BIT - 32), /* 39 -- 24, 23ef52 */
BMP_C(0x25000000) << (BMP_BIT - 32), /* 40 -- 8, 25 */
BMP_C(0x26000000) << (BMP_BIT - 32), /* 41 -- 8, 26 */
BMP_C(0x26b10000) << (BMP_BIT - 32), /* 42 -- 16, 26b1 */
BMP_C(0x27818000) << (BMP_BIT - 32), /* 43 -- 17, 04f03 */
BMP_C(0x27d00000) << (BMP_BIT - 32), /* 44 -- 13, 04fa */
BMP_C(0x28000000) << (BMP_BIT - 32), /* 45 -- 5, 05 */
BMP_C(0x29b10000) << (BMP_BIT - 32), /* 46 -- 16, 29b1 */
BMP_C(0x2f000000) << (BMP_BIT - 32), /* 47 -- 8, 2f */
BMP_C(0x30000000) << (BMP_BIT - 32), /* 48 -- 4, 3/ 5, 6 */
BMP_C(0x3010bf7f) << (BMP_BIT - 32), /* 49 -- 32,3010bf7f */
BMP_C(0x31000000) << (BMP_BIT - 32), /* 50 -- 8, 31 */
BMP_C(0x31800000) << (BMP_BIT - 32), /* 51 -- 10, 0c6 */
BMP_C(0x31c30000) << (BMP_BIT - 32), /* 52 -- 16, 31c3 */
BMP_C(0x328b6300) << (BMP_BIT - 32), /* 53 -- 24, 328b63 */
BMP_C(0x34000000) << (BMP_BIT - 32), /* 54 -- 6, 0d */
BMP_C(0x340bc6d9) << (BMP_BIT - 32), /* 55 -- 32,340bc6d9 */
BMP_C(0x37000000) << (BMP_BIT - 32), /* 56 -- 8, 37 */
BMP_C(0x38000000) << (BMP_BIT - 32), /* 57 -- 5, 07 */
BMP_C(0x39000000) << (BMP_BIT - 32), /* 58 -- 8, 39 */
BMP_C(0x3d650000) << (BMP_BIT - 32), /* 59 -- 16, 3d65 */
BMP_C(0x3e000000) << (BMP_BIT - 32), /* 60 -- 8, 3e */
BMP_C(0x40000000) << (BMP_BIT - 32), /* 61 -- 3, 2 */
BMP_C(0x42000000) << (BMP_BIT - 32), /* 62 -- 8, 42 */
BMP_C(0x44c20000) << (BMP_BIT - 32), /* 63 -- 16, 44c2 */
BMP_C(0x45270551) << (BMP_BIT - 32), /* 64 -- 32,45270551 */
BMP_C(0x48000000) << (BMP_BIT - 32), /* 65 -- 5, 09 */
BMP_C(0x49000000) << (BMP_BIT - 32), /* 66 -- 8, 49 */
BMP_C(0x4a800000) << (BMP_BIT - 32), /* 67 -- 10, 12a */
BMP_C(0x4acc0000) << (BMP_BIT - 32), /* 68 -- 15, 2566 */
BMP_C(0x4b000000) << (BMP_BIT - 32), /* 69 -- 8, 4b */
BMP_C(0x4b370000) << (BMP_BIT - 32), /* 70 -- 16, 4b37 */
BMP_C(0x4c000000) << (BMP_BIT - 32), /* 71 -- 6, 13 */
BMP_C(0x4c060000) << (BMP_BIT - 32), /* 72 -- 16, 4c06 */
BMP_C(0x53000000) << (BMP_BIT - 32), /* 73 -- 8, 53 */
BMP_C(0x55000000) << (BMP_BIT - 32), /* 74 -- 8, 55 */
BMP_C(0x55555500) << (BMP_BIT - 32), /* 75 -- 24, 555555 */
BMP_C(0x59350000) << (BMP_BIT - 32), /* 76 -- 16, 5935 */
BMP_C(0x5d380000) << (BMP_BIT - 32), /* 77 -- 16, 5d38 */
BMP_C(0x5d400000) << (BMP_BIT - 32), /* 78 -- 10, 175 */
BMP_C(0x5d6dcb00) << (BMP_BIT - 32), /* 79 -- 24, 5d6dcb */
BMP_C(0x60000000) << (BMP_BIT - 32), /* 80 -- 3, 3 */
BMP_C(0x60e00000) << (BMP_BIT - 32), /* 81 -- 11, 307 */
BMP_C(0x63d00000) << (BMP_BIT - 32), /* 82 -- 16, 63d0 */
BMP_C(0x64000000) << (BMP_BIT - 32), /* 83 -- 6, 19 */
BMP_C(0x66400000) << (BMP_BIT - 32), /* 84 -- 10, 199 */
BMP_C(0x66c50000) << (BMP_BIT - 32), /* 85 -- 16, 66c5 */
BMP_C(0x6f630000) << (BMP_BIT - 32), /* 86 -- 16, 6f63 */
BMP_C(0x6f910000) << (BMP_BIT - 32), /* 87 -- 16, 6f91 */
BMP_C(0x70000000) << (BMP_BIT - 32), /* 88 -- 4, 7 */
BMP_C(0x70a00000) << (BMP_BIT - 32), /* 89 -- 11, 385 */
BMP_C(0x755b0000) << (BMP_BIT - 32), /* 90 -- 16, 755b */
BMP_C(0x765e7680) << (BMP_BIT - 32), /* 91 -- 32,765e7680 */
BMP_C(0x76c20800) << (BMP_BIT - 32), /* 92 -- 32, 0ed841 */
BMP_C(0x7979bd00) << (BMP_BIT - 32), /* 93 -- 24, 7979bd */
BMP_C(0x7e000000) << (BMP_BIT - 32), /* 94 -- 8, 7e */
BMP_C(0x80000000) << (BMP_BIT - 32), /* 95 -- 3, 4 */
BMP_C(0x80006300) << (BMP_BIT - 32), /* 96 -- 24, 800063 */
BMP_C(0x80050000) << (BMP_BIT - 32), /* 97 -- 16, 8005 */
BMP_C(0x800d0000) << (BMP_BIT - 32), /* 98 -- 16, 800d */
BMP_C(0x800fe300) << (BMP_BIT - 32), /* 99 -- 24, 800fe3 */
BMP_C(0x80b40000) << (BMP_BIT - 32), /* 100 -- 14, 202d */
BMP_C(0x80c2e71c) << (BMP_BIT - 32), /* 101 -- 30,2030b9c7 */
BMP_C(0x80f00000) << (BMP_BIT - 32), /* 102 -- 12, 80f */
BMP_C(0x814141ab) << (BMP_BIT - 32), /* 103 -- 32,814141ab */
BMP_C(0x8144c800) << (BMP_BIT - 32), /* 104 -- 21, 102899 */
BMP_C(0x864cfb00) << (BMP_BIT - 32), /* 105 -- 24, 864cfb */
BMP_C(0x87315576) << (BMP_BIT - 32), /* 106 -- 32,87315576 */
BMP_C(0x89ec0000) << (BMP_BIT - 32), /* 107 -- 16, 89ec */
BMP_C(0x8a000000) << (BMP_BIT - 32), /* 108 -- 7, 45 */
BMP_C(0x8b320000) << (BMP_BIT - 32), /* 109 -- 15, 4599 */
BMP_C(0x8bb70000) << (BMP_BIT - 32), /* 110 -- 16, 8bb7 */
BMP_C(0x8cc00000) << (BMP_BIT - 32), /* 111 -- 10, 233 */
BMP_C(0x904cddbf) << (BMP_BIT - 32), /* 112 -- 32,904cddbf */
BMP_C(0x906e0000) << (BMP_BIT - 32), /* 113 -- 16, 906e */
BMP_C(0x94000000) << (BMP_BIT - 32), /* 114 -- 8, 94 */
BMP_C(0x97000000) << (BMP_BIT - 32), /* 115 -- 8, 97 */
BMP_C(0x98000000) << (BMP_BIT - 32), /* 116 -- 6, 26 */
BMP_C(0x9b000000) << (BMP_BIT - 32), /* 117 -- 8, 9b */
BMP_C(0x9c000000) << (BMP_BIT - 32), /* 118 -- 6, 27 */
BMP_C(0x9d5e4de2) << (BMP_BIT - 32), /* 119 -- 31,4eaf26f1 */
BMP_C(0x9e000000) << (BMP_BIT - 32), /* 120 -- 7, 4f */
BMP_C(0x9ecf0000) << (BMP_BIT - 32), /* 121 -- 16, 9ecf */
BMP_C(0xa0970000) << (BMP_BIT - 32), /* 122 -- 16, a097 */
BMP_C(0xa1000000) << (BMP_BIT - 32), /* 123 -- 8, a1 */
BMP_C(0xa3660000) << (BMP_BIT - 32), /* 124 -- 16, a366 */
BMP_C(0xa6000000) << (BMP_BIT - 32), /* 125 -- 7, 53 */
BMP_C(0xa7000000) << (BMP_BIT - 32), /* 126 -- 8, a7 */
BMP_C(0xa8000000) << (BMP_BIT - 32), /* 127 -- 5, 15 */
BMP_C(0xa8190000) << (BMP_BIT - 32), /* 128 -- 16, a819 */
BMP_C(0xa833982b) << (BMP_BIT - 32), /* 129 -- 32,a833982b */
BMP_C(0xabcdef00) << (BMP_BIT - 32), /* 130 -- 24, abcdef */
BMP_C(0xac000000) << (BMP_BIT - 32), /* 131 -- 8, ac */
BMP_C(0xaee70000) << (BMP_BIT - 32), /* 132 -- 16, aee7 */
BMP_C(0xb0000000) << (BMP_BIT - 32), /* 133 -- 4, b */
BMP_C(0xb0010000) << (BMP_BIT - 32), /* 134 -- 16, b001 */
BMP_C(0xb2aa0000) << (BMP_BIT - 32), /* 135 -- 16, b2aa */
BMP_C(0xb3400000) << (BMP_BIT - 32), /* 136 -- 12, b34 */
BMP_C(0xb42d8000) << (BMP_BIT - 32), /* 137 -- 17, 1685b */
BMP_C(0xb4600000) << (BMP_BIT - 32), /* 138 -- 11, 5a3 */
BMP_C(0xb4c80000) << (BMP_BIT - 32), /* 139 -- 16, b4c8 */
BMP_C(0xb4f3e600) << (BMP_BIT - 32), /* 140 -- 24, b4f3e6 */
BMP_C(0xb704ce00) << (BMP_BIT - 32), /* 141 -- 24, b704ce */
BMP_C(0xb798b438) << (BMP_BIT - 32), /* 142 -- 32,b798b438 */
BMP_C(0xbb3d0000) << (BMP_BIT - 32), /* 143 -- 16, bb3d */
BMP_C(0xbc000000) << (BMP_BIT - 32), /* 144 -- 6,2f/ 8,bc */
BMP_C(0xbd0be338) << (BMP_BIT - 32), /* 145 -- 32,bd0be338 */
BMP_C(0xbdf40000) << (BMP_BIT - 32), /* 146 -- 16, bdf4 */
BMP_C(0xbf050000) << (BMP_BIT - 32), /* 147 -- 16, bf05 */
BMP_C(0xc0000000) << (BMP_BIT - 32), /* 148 -- 3, 6 */
BMP_C(0xc2000000) << (BMP_BIT - 32), /* 149 -- 7, 61 */
BMP_C(0xc25a5600) << (BMP_BIT - 32), /* 150 -- 24, c25a56 */
BMP_C(0xc2b70000) << (BMP_BIT - 32), /* 151 -- 16, c2b7 */
BMP_C(0xc2b80000) << (BMP_BIT - 32), /* 152 -- 14, 30ae */
BMP_C(0xc4000000) << (BMP_BIT - 32), /* 153 -- 8, c4 */
BMP_C(0xc6c60000) << (BMP_BIT - 32), /* 154 -- 16, c6c6 */
BMP_C(0xc704dd7b) << (BMP_BIT - 32), /* 155 -- 32,c704dd7b */
BMP_C(0xc8000000) << (BMP_BIT - 32), /* 156 -- 5, 19 */
BMP_C(0xc8670000) << (BMP_BIT - 32), /* 157 -- 16, c867 */
BMP_C(0xcbf43926) << (BMP_BIT - 32), /* 158 -- 32,cbf43926 */
BMP_C(0xcde70300) << (BMP_BIT - 32), /* 159 -- 24, cde703 */
BMP_C(0xce3c0000) << (BMP_BIT - 32), /* 160 -- 16, ce3c */
BMP_C(0xd0000000) << (BMP_BIT - 32), /* 161 -- 8, d0 */
BMP_C(0xd02a0000) << (BMP_BIT - 32), /* 162 -- 15, 6815 */
BMP_C(0xd0db0000) << (BMP_BIT - 32), /* 163 -- 16, d0db */
BMP_C(0xd3100000) << (BMP_BIT - 32), /* 164 -- 12, d31 */
BMP_C(0xd3be9568) << (BMP_BIT - 32), /* 165 -- 30,34efa55a */
BMP_C(0xd4d00000) << (BMP_BIT - 32), /* 166 -- 12, d4d */
BMP_C(0xd5000000) << (BMP_BIT - 32), /* 167 -- 8, d5 */
BMP_C(0xd64e0000) << (BMP_BIT - 32), /* 168 -- 16, d64e */
BMP_C(0xda000000) << (BMP_BIT - 32), /* 169 -- 8, da */
BMP_C(0xdaf00000) << (BMP_BIT - 32), /* 170 -- 12, daf */
BMP_C(0xdebb20e3) << (BMP_BIT - 32), /* 171 -- 32,debb20e3 */
BMP_C(0xdf000000) << (BMP_BIT - 32), /* 172 -- 8, df */
BMP_C(0xe0000000) << (BMP_BIT - 32), /* 173 -- 3, 7 */
BMP_C(0xe3069283) << (BMP_BIT - 32), /* 174 -- 32,e3069283 */
BMP_C(0xe3940000) << (BMP_BIT - 32), /* 175 -- 16, e394 */
BMP_C(0xe5cc0000) << (BMP_BIT - 32), /* 176 -- 16, e5cc */
BMP_C(0xe7a80000) << (BMP_BIT - 32), /* 177 -- 13, 1cf5 */
BMP_C(0xe8000000) << (BMP_BIT - 32), /* 178 -- 6, 3a */
BMP_C(0xea000000) << (BMP_BIT - 32), /* 179 -- 7, 75 */
BMP_C(0xea820000) << (BMP_BIT - 32), /* 180 -- 16, ea82 */
BMP_C(0xec000000) << (BMP_BIT - 32), /* 181 -- 6, 3b */
BMP_C(0xf0000000) << (BMP_BIT - 32), /* 182 -- 4, f */
BMP_C(0xf0b80000) << (BMP_BIT - 32), /* 183 -- 16, f0b8 */
BMP_C(0xf1300000) << (BMP_BIT - 32), /* 184 -- 12, f13 */
BMP_C(0xf4000000) << (BMP_BIT - 32), /* 185 -- 8, f4 */
BMP_C(0xf4acfb13) << (BMP_BIT - 32), /* 186 -- 32,f4acfb13 */
BMP_C(0xf5b00000) << (BMP_BIT - 32), /* 187 -- 12, f5b */
BMP_C(0xf6400000) << (BMP_BIT - 32), /* 188 -- 10, 3d9 */
BMP_C(0xf8000000) << (BMP_BIT - 32), /* 189 -- 5, 1f */
BMP_C(0xfc000000) << (BMP_BIT - 32), /* 190 -- 6, 3f */
BMP_C(0xfc891918) << (BMP_BIT - 32), /* 191 -- 32,fc891918 */
BMP_C(0xfd000000) << (BMP_BIT - 32), /* 192 -- 8, fd */
BMP_C(0xfe000000) << (BMP_BIT - 32), /* 193 -- 7, 7f */
BMP_C(0xfedcba00) << (BMP_BIT - 32), /* 194 -- 24, fedcba */
BMP_C(0xfee80000) << (BMP_BIT - 32), /* 195 -- 16, fee8 */
BMP_C(0xff000000) << (BMP_BIT - 32), /* 196 -- 8, ff */
BMP_C(0xffc00000) << (BMP_BIT - 32), /* 197 -- 10, 3ff */
BMP_C(0xfff00000) << (BMP_BIT - 32), /* 198 -- 12, fff */
BMP_C(0xfffc0000) << (BMP_BIT - 32), /* 199 -- 14, 3fff */
BMP_C(0xffff0000) << (BMP_BIT - 32), /* 200 -- 16, ffff */
BMP_C(0xffffff00) << (BMP_BIT - 32), /* 201 -- 24, ffffff */
BMP_C(0xfffffffc) << (BMP_BIT - 32), /* 202 -- 30,3fffffff */
BMP_C(0xfffffffe) << (BMP_BIT - 32), /* 203 -- 31,7fffffff */
BMP_C(0xffffffff) << (BMP_BIT - 32), /* 204 -- 32,ffffffff */
};
static const struct malias aliases[];
@ -467,144 +471,145 @@ static const struct malias aliases[];
* Sorted by left-justified polynomial for bsearch().
*/
static const struct mpreset models[] = {
{64UL, b64, b64a, P_LE, b64a, b64b, b64c, aliases+ 99}, /* 0 */
{32UL, b32+ 0, 0, P_BE, 0, b32+143, 0, aliases+137}, /* 1 */
{40UL, b40, 0, P_BE, b40a, b40b, b40c, aliases+ 87}, /* 2 */
{24UL, b32+ 3, b32+ 74, P_LE, 0, b32+148, 0, aliases+ 60}, /* 3 */
{32UL, b32+ 8, 0, P_BE, b32+202, b32+ 90, b32+153, aliases+ 81}, /* 4 */
{32UL, b32+ 8, b32+202, P_BE, 0, b32+ 7, 0, aliases+ 80}, /* 5 */
{32UL, b32+ 8, b32+202, P_BE, b32+202, b32+189, b32+153, aliases+ 75}, /* 6 */
{32UL, b32+ 8, b32+202, P_LE, 0, b32+ 54, 0, aliases+129}, /* 7 */
{32UL, b32+ 8, b32+202, P_LE, b32+202, b32+156, b32+169, aliases+ 71}, /* 8 */
{64UL, b64, b64a, P_LE, b64a, b64b, b64c, aliases+100}, /* 0 */
{32UL, b32+ 0, 0, P_BE, 0, b32+145, 0, aliases+138}, /* 1 */
{40UL, b40, 0, P_BE, b40a, b40b, b40c, aliases+ 88}, /* 2 */
{24UL, b32+ 3, b32+ 75, P_LE, 0, b32+150, 0, aliases+ 60}, /* 3 */
{32UL, b32+ 8, 0, P_BE, b32+204, b32+ 91, b32+155, aliases+ 82}, /* 4 */
{32UL, b32+ 8, b32+204, P_BE, 0, b32+ 7, 0, aliases+ 81}, /* 5 */
{32UL, b32+ 8, b32+204, P_BE, b32+204, b32+191, b32+155, aliases+ 76}, /* 6 */
{32UL, b32+ 8, b32+204, P_LE, 0, b32+ 55, 0, aliases+130}, /* 7 */
{32UL, b32+ 8, b32+204, P_LE, b32+204, b32+158, b32+171, aliases+ 72}, /* 8 */
{16UL, b32+ 9, 0, P_BE, 0, b32+ 5, 0, aliases+ 31}, /* 9 */
{16UL, b32+ 9, 0, P_BE, b32+ 1, b32+ 4, b32+ 9, aliases+ 30}, /* 10 */
{ 8UL, b32+ 10, 0, P_BE, 0, b32+183, 0, aliases+105}, /* 11 */
{ 8UL, b32+ 10, 0, P_BE, b32+ 73, b32+121, b32+129, aliases+116}, /* 12 */
{ 8UL, b32+ 10, b32+194, P_LE, 0, b32+159, 0, aliases+120}, /* 13 */
{31UL, b32+ 11, b32+201, P_BE, b32+201, b32+ 25, b32+117, aliases+ 70}, /* 14 */
{ 6UL, b32+ 13, 0, P_LE, 0, b32+ 24, 0, aliases+ 95}, /* 15 */
{82UL, b82, 0, P_LE, 0, b82a, 0, aliases+123}, /* 16 */
{16UL, b32+ 17, 0, P_BE, 0, b32+ 51, 0, aliases+138}, /* 17 */
{16UL, b32+ 17, 0, P_BE, b32+198, b32+158, b32+ 28, aliases+ 36}, /* 18 */
{16UL, b32+ 17, 0, P_LE, 0, b32+ 36, 0, aliases+130}, /* 19 */
{16UL, b32+ 17, b32+ 28, P_BE, 0, b32+174, 0, aliases+ 21}, /* 20 */
{16UL, b32+ 17, b32+105, P_LE, 0, b32+ 41, 0, aliases+ 53}, /* 21 */
{16UL, b32+ 17, b32+133, P_LE, 0, b32+ 81, 0, aliases+ 49}, /* 22 */
{16UL, b32+ 17, b32+152, P_LE, 0, b32+145, 0, aliases+124}, /* 23 */
{16UL, b32+ 17, b32+198, P_BE, 0, b32+ 45, 0, aliases+ 24}, /* 24 */
{16UL, b32+ 17, b32+198, P_BE, b32+198, b32+166, b32+ 28, aliases+ 35}, /* 25 */
{16UL, b32+ 17, b32+198, P_LE, 0, b32+ 86, 0, aliases+ 45}, /* 26 */
{16UL, b32+ 17, b32+198, P_LE, b32+198, b32+111, b32+181, aliases+134}, /* 27 */
{ 7UL, b32+ 18, 0, P_BE, 0, b32+177, 0, aliases+102}, /* 28 */
{ 6UL, b32+ 26, b32+188, P_BE, 0, b32+179, 0, aliases+ 92}, /* 29 */
{ 8UL, b32+ 27, 0, P_BE, 0, b32+ 55, 0, aliases+113}, /* 30 */
{ 8UL, b32+ 27, b32+190, P_BE, 0, b32+ 93, 0, aliases+115}, /* 31 */
{ 8UL, b32+ 27, b32+194, P_BE, b32+194, b32+ 68, b32+151, aliases+121}, /* 32 */
{ 8UL, b32+ 27, b32+194, P_LE, 0, b32+113, 0, aliases+112}, /* 33 */
{16UL, b32+ 29, b32+198, P_BE, b32+198, b32+126, b32+173, aliases+ 48}, /* 34 */
{32UL, b32+ 30, b32+202, P_LE, b32+202, b32+172, b32+140, aliases+ 82}, /* 35 */
{14UL, b32+ 33, 0, P_LE, 0, b32+ 34, 0, aliases+ 14}, /* 36 */
{ 5UL, b32+ 44, b32+187, P_LE, b32+187, b32+154, b32+ 47, aliases+ 90}, /* 37 */
{ 8UL, b32+ 46, 0, P_BE, 0, b32+ 59, 0, aliases+119}, /* 38 */
{ 8UL, b32+ 46, b32+194, P_BE, b32+194, b32+170, b32+ 61, aliases+107}, /* 39 */
{ 4UL, b32+ 47, 0, P_LE, 0, b32+ 87, 0, aliases+ 86}, /* 40 */
{ 4UL, b32+ 47, b32+180, P_BE, b32+180, b32+131, b32+ 32, aliases+ 85}, /* 41 */
{ 8UL, b32+ 49, 0, P_LE, 0, b32+121, 0, aliases+118}, /* 42 */
{24UL, b32+ 52, b32+199, P_BE, b32+199, b32+138, b32+ 20, aliases+ 63}, /* 43 */
{ 8UL, b32+ 57, 0, P_LE, 0, b32+ 21, 0, aliases+110}, /* 44 */
{16UL, b32+ 58, 0, P_BE, b32+198, b32+149, b32+122, aliases+ 33}, /* 45 */
{16UL, b32+ 58, 0, P_LE, b32+198, b32+178, b32+ 84, aliases+ 32}, /* 46 */
{64UL, b64d, 0, P_BE, 0, b64e, 0, aliases+ 96}, /* 47 */
{64UL, b64d, b64a, P_BE, b64a, b64f, b64g, aliases+100}, /* 48 */
{64UL, b64d, b64a, P_LE, b64a, b64h, b64i, aliases+101}, /* 49 */
{ 5UL, b32+ 64, b32+ 64, P_BE, 0, 0, 0, aliases+ 88}, /* 50 */
{ 8UL, b32+ 65, 0, P_BE, b32+194, b32+112, b32+ 72, aliases+114}, /* 51 */
{16UL, b32+ 75, 0, P_BE, 0, b32+ 76, 0, aliases+ 46}, /* 52 */
{10UL, b32+ 77, 0, P_BE, b32+195, b32+ 66, b32+ 50, aliases+ 5}, /* 53 */
{24UL, b32+ 78, b32+128, P_BE, 0, b32+ 31, 0, aliases+ 62}, /* 54 */
{24UL, b32+ 78, b32+192, P_BE, 0, b32+ 92, 0, aliases+ 61}, /* 55 */
{ 3UL, b32+ 79, 0, P_BE, b32+171, b32+ 94, b32+ 60, aliases+ 67}, /* 56 */
{ 3UL, b32+ 79, b32+171, P_LE, 0, b32+146, 0, aliases+ 68}, /* 57 */
{11UL, b32+ 80, 0, P_BE, 0, b32+ 14, 0, aliases+ 7}, /* 58 */
{ 6UL, b32+ 82, 0, P_LE, 0, b32+114, 0, aliases+ 93}, /* 59 */
{16UL, b32+ 85, 0, P_BE, 0, b32+144, 0, aliases+ 42}, /* 60 */
{11UL, b32+ 88, b32+ 6, P_BE, 0, b32+136, 0, aliases+ 6}, /* 61 */
{16UL, b32+ 89, 0, P_BE, 0, b32+ 35, 0, aliases+ 47}, /* 62 */
{24UL, b32+ 95, 0, P_BE, 0, b32+ 38, 0, aliases+ 65}, /* 63 */
{16UL, b32+ 96, 0, P_BE, 0, b32+193, 0, aliases+ 22}, /* 64 */
{16UL, b32+ 96, 0, P_LE, 0, b32+141, 0, aliases+ 0}, /* 65 */
{16UL, b32+ 96, 0, P_LE, b32+198, b32+ 62, b32+132, aliases+ 44}, /* 66 */
{16UL, b32+ 96, b32+ 97, P_BE, 0, b32+119, 0, aliases+ 29}, /* 67 */
{16UL, b32+ 96, b32+198, P_BE, 0, b32+130, 0, aliases+ 27}, /* 68 */
{16UL, b32+ 96, b32+198, P_LE, 0, b32+ 69, 0, aliases+131}, /* 69 */
{16UL, b32+ 96, b32+198, P_LE, b32+198, b32+137, b32+132, aliases+ 55}, /* 70 */
{14UL, b32+ 98, 0, P_BE, b32+197, b32+150, b32+ 15, aliases+ 15}, /* 71 */
{30UL, b32+ 99, b32+200, P_BE, b32+200, b32+ 19, b32+163, aliases+ 69}, /* 72 */
{12UL, b32+100, 0, P_BE, 0, b32+185, 0, aliases+ 10}, /* 73 */
{12UL, b32+100, 0, P_BELE, 0, b32+168, 0, aliases+ 12}, /* 74 */
{32UL, b32+101, 0, P_BE, 0, b32+ 48, 0, aliases+ 84}, /* 75 */
{21UL, b32+102, 0, P_BE, 0, b32+ 91, 0, aliases+ 58}, /* 76 */
{24UL, b32+103, 0, P_BE, 0, b32+157, 0, aliases+ 64}, /* 77 */
{24UL, b32+103, b32+139, P_BE, 0, b32+ 37, 0, aliases+ 59}, /* 78 */
{ 7UL, b32+106, 0, P_BE, 0, b32+147, 0, aliases+104}, /* 79 */
{15UL, b32+107, 0, P_BE, 0, b32+ 12, 0, aliases+ 16}, /* 80 */
{16UL, b32+108, 0, P_BE, 0, b32+161, 0, aliases+ 51}, /* 81 */
{10UL, b32+109, 0, P_BE, 0, b32+ 83, 0, aliases+ 3}, /* 82 */
{ 8UL, b32+115, 0, P_BE, 0, b32+177, 0, aliases+117}, /* 83 */
{ 8UL, b32+115, 0, P_LE, 0, b32+ 39, 0, aliases+122}, /* 84 */
{ 8UL, b32+115, b32+194, P_BE, 0, b32+167, 0, aliases+109}, /* 85 */
{ 6UL, b32+116, b32+188, P_BE, 0, b32+ 53, 0, aliases+ 91}, /* 86 */
{ 7UL, b32+118, b32+191, P_LE, 0, b32+123, 0, aliases+103}, /* 87 */
{16UL, b32+120, 0, P_BE, 0, b32+ 16, 0, aliases+ 52}, /* 88 */
{ 8UL, b32+124, 0, P_LE, 0, b32+ 40, 0, aliases+108}, /* 89 */
{ 5UL, b32+125, 0, P_LE, 0, b32+ 56, 0, aliases+ 89}, /* 90 */
{32UL, b32+127, b32+202, P_LE, b32+202, b32+104, b32+ 63, aliases+ 83}, /* 91 */
{17UL, b32+135, 0, P_BE, 0, b32+ 42, 0, aliases+ 57}, /* 92 */
{ 6UL, b32+142, 0, P_BE, b32+188, b32+ 70, b32+176, aliases+ 94}, /* 93 */
{16UL, b32+155, b32+198, P_BE, 0, b32+ 71, 0, aliases+ 26}, /* 94 */
{15UL, b32+160, 0, P_BE, b32+ 2, b32+ 67, b32+160, aliases+ 17}, /* 95 */
{12UL, b32+162, 0, P_BE, b32+196, b32+134, b32+ 23, aliases+ 11}, /* 96 */
{ 8UL, b32+165, 0, P_BE, 0, b32+142, 0, aliases+111}, /* 97 */
{13UL, b32+175, 0, P_BE, 0, b32+ 43, 0, aliases+ 13}, /* 98 */
{12UL, b32+182, b32+196, P_BE, 0, b32+164, 0, aliases+ 9}, /* 99 */
{32UL, b32+184, b32+202, P_LE, b32+202, b32+ 22, b32+110, aliases+ 74}, /* 100 */
{10UL, b32+186, b32+195, P_BE, 0, b32+109, 0, aliases+ 4}, /* 101 */
{ 8UL, b32+ 10, 0, P_BE, 0, b32+185, 0, aliases+106}, /* 11 */
{ 8UL, b32+ 10, 0, P_BE, b32+ 74, b32+123, b32+131, aliases+117}, /* 12 */
{ 8UL, b32+ 10, b32+196, P_LE, 0, b32+161, 0, aliases+121}, /* 13 */
{31UL, b32+ 11, b32+203, P_BE, b32+203, b32+ 25, b32+119, aliases+ 71}, /* 14 */
{ 6UL, b32+ 13, 0, P_LE, 0, b32+ 24, 0, aliases+ 96}, /* 15 */
{82UL, b82, 0, P_LE, 0, b82a, 0, aliases+124}, /* 16 */
{16UL, b32+ 17, 0, P_BE, 0, b32+ 52, 0, aliases+139}, /* 17 */
{16UL, b32+ 17, 0, P_BE, b32+200, b32+160, b32+ 28, aliases+ 36}, /* 18 */
{16UL, b32+ 17, 0, P_LE, 0, b32+ 37, 0, aliases+131}, /* 19 */
{16UL, b32+ 17, b32+ 28, P_BE, 0, b32+176, 0, aliases+ 21}, /* 20 */
{16UL, b32+ 17, b32+107, P_LE, 0, b32+ 42, 0, aliases+ 53}, /* 21 */
{16UL, b32+ 17, b32+135, P_LE, 0, b32+ 82, 0, aliases+ 49}, /* 22 */
{16UL, b32+ 17, b32+154, P_LE, 0, b32+147, 0, aliases+125}, /* 23 */
{16UL, b32+ 17, b32+200, P_BE, 0, b32+ 46, 0, aliases+ 24}, /* 24 */
{16UL, b32+ 17, b32+200, P_BE, b32+200, b32+168, b32+ 28, aliases+ 35}, /* 25 */
{16UL, b32+ 17, b32+200, P_LE, 0, b32+ 87, 0, aliases+ 45}, /* 26 */
{16UL, b32+ 17, b32+200, P_LE, b32+200, b32+113, b32+183, aliases+135}, /* 27 */
{ 7UL, b32+ 18, 0, P_BE, 0, b32+179, 0, aliases+103}, /* 28 */
{ 6UL, b32+ 26, b32+190, P_BE, 0, b32+181, 0, aliases+ 93}, /* 29 */
{ 8UL, b32+ 27, 0, P_BE, 0, b32+ 56, 0, aliases+114}, /* 30 */
{ 8UL, b32+ 27, b32+192, P_BE, 0, b32+ 94, 0, aliases+116}, /* 31 */
{ 8UL, b32+ 27, b32+196, P_BE, b32+196, b32+ 69, b32+153, aliases+122}, /* 32 */
{ 8UL, b32+ 27, b32+196, P_LE, 0, b32+115, 0, aliases+113}, /* 33 */
{16UL, b32+ 29, b32+200, P_BE, b32+200, b32+128, b32+175, aliases+ 48}, /* 34 */
{32UL, b32+ 30, b32+204, P_LE, b32+204, b32+174, b32+142, aliases+ 83}, /* 35 */
{14UL, b32+ 34, 0, P_LE, 0, b32+ 35, 0, aliases+ 14}, /* 36 */
{ 5UL, b32+ 45, b32+189, P_LE, b32+189, b32+156, b32+ 48, aliases+ 91}, /* 37 */
{ 8UL, b32+ 47, 0, P_BE, 0, b32+ 60, 0, aliases+120}, /* 38 */
{ 8UL, b32+ 47, b32+196, P_BE, b32+196, b32+172, b32+ 62, aliases+108}, /* 39 */
{ 4UL, b32+ 48, 0, P_LE, 0, b32+ 88, 0, aliases+ 87}, /* 40 */
{ 4UL, b32+ 48, b32+182, P_BE, b32+182, b32+133, b32+ 32, aliases+ 86}, /* 41 */
{ 8UL, b32+ 50, 0, P_LE, 0, b32+123, 0, aliases+119}, /* 42 */
{24UL, b32+ 53, b32+201, P_BE, b32+201, b32+140, b32+ 20, aliases+ 63}, /* 43 */
{ 8UL, b32+ 58, 0, P_LE, 0, b32+ 21, 0, aliases+111}, /* 44 */
{16UL, b32+ 59, 0, P_BE, b32+200, b32+151, b32+124, aliases+ 33}, /* 45 */
{16UL, b32+ 59, 0, P_LE, b32+200, b32+180, b32+ 85, aliases+ 32}, /* 46 */
{64UL, b64d, 0, P_BE, 0, b64e, 0, aliases+ 97}, /* 47 */
{64UL, b64d, b64a, P_BE, b64a, b64f, b64g, aliases+101}, /* 48 */
{64UL, b64d, b64a, P_LE, b64a, b64h, b64i, aliases+102}, /* 49 */
{ 5UL, b32+ 65, b32+ 65, P_BE, 0, 0, 0, aliases+ 89}, /* 50 */
{ 8UL, b32+ 66, 0, P_BE, b32+196, b32+114, b32+ 73, aliases+115}, /* 51 */
{16UL, b32+ 76, 0, P_BE, 0, b32+ 77, 0, aliases+ 46}, /* 52 */
{10UL, b32+ 78, 0, P_BE, b32+197, b32+ 67, b32+ 51, aliases+ 5}, /* 53 */
{24UL, b32+ 79, b32+130, P_BE, 0, b32+ 31, 0, aliases+ 62}, /* 54 */
{24UL, b32+ 79, b32+194, P_BE, 0, b32+ 93, 0, aliases+ 61}, /* 55 */
{ 3UL, b32+ 80, 0, P_BE, b32+173, b32+ 95, b32+ 61, aliases+ 68}, /* 56 */
{ 3UL, b32+ 80, b32+173, P_LE, 0, b32+148, 0, aliases+ 69}, /* 57 */
{11UL, b32+ 81, 0, P_BE, 0, b32+ 14, 0, aliases+ 7}, /* 58 */
{ 6UL, b32+ 83, 0, P_LE, 0, b32+116, 0, aliases+ 94}, /* 59 */
{16UL, b32+ 86, 0, P_BE, 0, b32+146, 0, aliases+ 42}, /* 60 */
{11UL, b32+ 89, b32+ 6, P_BE, 0, b32+138, 0, aliases+ 6}, /* 61 */
{16UL, b32+ 90, 0, P_BE, 0, b32+ 36, 0, aliases+ 47}, /* 62 */
{24UL, b32+ 96, 0, P_BE, 0, b32+ 39, 0, aliases+ 65}, /* 63 */
{24UL, b32+ 96, b32+201, P_BE, b32+201, b32+ 33, b32+ 99, aliases+ 67}, /* 64 */
{16UL, b32+ 97, 0, P_BE, 0, b32+195, 0, aliases+ 22}, /* 65 */
{16UL, b32+ 97, 0, P_LE, 0, b32+143, 0, aliases+ 0}, /* 66 */
{16UL, b32+ 97, 0, P_LE, b32+200, b32+ 63, b32+134, aliases+ 44}, /* 67 */
{16UL, b32+ 97, b32+ 98, P_BE, 0, b32+121, 0, aliases+ 29}, /* 68 */
{16UL, b32+ 97, b32+200, P_BE, 0, b32+132, 0, aliases+ 27}, /* 69 */
{16UL, b32+ 97, b32+200, P_LE, 0, b32+ 70, 0, aliases+132}, /* 70 */
{16UL, b32+ 97, b32+200, P_LE, b32+200, b32+139, b32+134, aliases+ 55}, /* 71 */
{14UL, b32+100, 0, P_BE, b32+199, b32+152, b32+ 15, aliases+ 15}, /* 72 */
{30UL, b32+101, b32+202, P_BE, b32+202, b32+ 19, b32+165, aliases+ 70}, /* 73 */
{12UL, b32+102, 0, P_BE, 0, b32+187, 0, aliases+ 10}, /* 74 */
{12UL, b32+102, 0, P_BELE, 0, b32+170, 0, aliases+ 12}, /* 75 */
{32UL, b32+103, 0, P_BE, 0, b32+ 49, 0, aliases+ 85}, /* 76 */
{21UL, b32+104, 0, P_BE, 0, b32+ 92, 0, aliases+ 58}, /* 77 */
{24UL, b32+105, 0, P_BE, 0, b32+159, 0, aliases+ 64}, /* 78 */
{24UL, b32+105, b32+141, P_BE, 0, b32+ 38, 0, aliases+ 59}, /* 79 */
{ 7UL, b32+108, 0, P_BE, 0, b32+149, 0, aliases+105}, /* 80 */
{15UL, b32+109, 0, P_BE, 0, b32+ 12, 0, aliases+ 16}, /* 81 */
{16UL, b32+110, 0, P_BE, 0, b32+163, 0, aliases+ 51}, /* 82 */
{10UL, b32+111, 0, P_BE, 0, b32+ 84, 0, aliases+ 3}, /* 83 */
{ 8UL, b32+117, 0, P_BE, 0, b32+179, 0, aliases+118}, /* 84 */
{ 8UL, b32+117, 0, P_LE, 0, b32+ 40, 0, aliases+123}, /* 85 */
{ 8UL, b32+117, b32+196, P_BE, 0, b32+169, 0, aliases+110}, /* 86 */
{ 6UL, b32+118, b32+190, P_BE, 0, b32+ 54, 0, aliases+ 92}, /* 87 */
{ 7UL, b32+120, b32+193, P_LE, 0, b32+125, 0, aliases+104}, /* 88 */
{16UL, b32+122, 0, P_BE, 0, b32+ 16, 0, aliases+ 52}, /* 89 */
{ 8UL, b32+126, 0, P_LE, 0, b32+ 41, 0, aliases+109}, /* 90 */
{ 5UL, b32+127, 0, P_LE, 0, b32+ 57, 0, aliases+ 90}, /* 91 */
{32UL, b32+129, b32+204, P_LE, b32+204, b32+106, b32+ 64, aliases+ 84}, /* 92 */
{17UL, b32+137, 0, P_BE, 0, b32+ 43, 0, aliases+ 57}, /* 93 */
{ 6UL, b32+144, 0, P_BE, b32+190, b32+ 71, b32+178, aliases+ 95}, /* 94 */
{16UL, b32+157, b32+200, P_BE, 0, b32+ 72, 0, aliases+ 26}, /* 95 */
{15UL, b32+162, 0, P_BE, b32+ 2, b32+ 68, b32+162, aliases+ 17}, /* 96 */
{12UL, b32+164, 0, P_BE, b32+198, b32+136, b32+ 23, aliases+ 11}, /* 97 */
{ 8UL, b32+167, 0, P_BE, 0, b32+144, 0, aliases+112}, /* 98 */
{13UL, b32+177, 0, P_BE, 0, b32+ 44, 0, aliases+ 13}, /* 99 */
{12UL, b32+184, b32+198, P_BE, 0, b32+166, 0, aliases+ 9}, /* 100 */
{32UL, b32+186, b32+204, P_LE, b32+204, b32+ 22, b32+112, aliases+ 75}, /* 101 */
{10UL, b32+188, b32+197, P_BE, 0, b32+111, 0, aliases+ 4}, /* 102 */
{ 0UL, 0, 0, P_BE, 0, 0, 0, NULL }, /* terminating entry */
};
# define NPRESETS 102
# define NPRESETS 103
/* List of names with pointers to models, pre-sorted for use with bsearch() */
static const struct malias aliases[] = {
{"ARC", models+ 65}, /* 0 */
{"ARC", models+ 66}, /* 0 */
{"B-CRC-32", models+ 6}, /* 1 */
{"CKSUM", models+ 4}, /* 2 */
{"CRC-10", models+ 82}, /* 3 */
{"CRC-10/CDMA2000", models+101}, /* 4 */
{"CRC-10", models+ 83}, /* 3 */
{"CRC-10/CDMA2000", models+102}, /* 4 */
{"CRC-10/GSM", models+ 53}, /* 5 */
{"CRC-11", models+ 61}, /* 6 */
{"CRC-11/UMTS", models+ 58}, /* 7 */
{"CRC-12/3GPP", models+ 74}, /* 8 */
{"CRC-12/CDMA2000", models+ 99}, /* 9 */
{"CRC-12/DECT", models+ 73}, /* 10 */
{"CRC-12/GSM", models+ 96}, /* 11 */
{"CRC-12/UMTS", models+ 74}, /* 12 */
{"CRC-13/BBC", models+ 98}, /* 13 */
{"CRC-12/3GPP", models+ 75}, /* 8 */
{"CRC-12/CDMA2000", models+100}, /* 9 */
{"CRC-12/DECT", models+ 74}, /* 10 */
{"CRC-12/GSM", models+ 97}, /* 11 */
{"CRC-12/UMTS", models+ 75}, /* 12 */
{"CRC-13/BBC", models+ 99}, /* 13 */
{"CRC-14/DARC", models+ 36}, /* 14 */
{"CRC-14/GSM", models+ 71}, /* 15 */
{"CRC-15", models+ 80}, /* 16 */
{"CRC-15/MPT1327", models+ 95}, /* 17 */
{"CRC-16", models+ 65}, /* 18 */
{"CRC-14/GSM", models+ 72}, /* 15 */
{"CRC-15", models+ 81}, /* 16 */
{"CRC-15/MPT1327", models+ 96}, /* 17 */
{"CRC-16", models+ 66}, /* 18 */
{"CRC-16/ACORN", models+ 17}, /* 19 */
{"CRC-16/ARC", models+ 65}, /* 20 */
{"CRC-16/ARC", models+ 66}, /* 20 */
{"CRC-16/AUG-CCITT", models+ 20}, /* 21 */
{"CRC-16/BUYPASS", models+ 64}, /* 22 */
{"CRC-16/BUYPASS", models+ 65}, /* 22 */
{"CRC-16/CCITT", models+ 19}, /* 23 */
{"CRC-16/CCITT-FALSE", models+ 24}, /* 24 */
{"CRC-16/CCITT-TRUE", models+ 19}, /* 25 */
{"CRC-16/CDMA2000", models+ 94}, /* 26 */
{"CRC-16/CMS", models+ 68}, /* 27 */
{"CRC-16/CDMA2000", models+ 95}, /* 26 */
{"CRC-16/CMS", models+ 69}, /* 27 */
{"CRC-16/DARC", models+ 25}, /* 28 */
{"CRC-16/DDS-110", models+ 67}, /* 29 */
{"CRC-16/DDS-110", models+ 68}, /* 29 */
{"CRC-16/DECT-R", models+ 10}, /* 30 */
{"CRC-16/DECT-X", models+ 9}, /* 31 */
{"CRC-16/DNP", models+ 46}, /* 32 */
@ -616,108 +621,109 @@ static const struct malias aliases[] = {
{"CRC-16/IBM-SDLC", models+ 27}, /* 38 */
{"CRC-16/IEC-61158-2", models+ 34}, /* 39 */
{"CRC-16/ISO-HDLC", models+ 27}, /* 40 */
{"CRC-16/LHA", models+ 65}, /* 41 */
{"CRC-16/LHA", models+ 66}, /* 41 */
{"CRC-16/LJ1200", models+ 60}, /* 42 */
{"CRC-16/LTE", models+ 17}, /* 43 */
{"CRC-16/MAXIM", models+ 66}, /* 44 */
{"CRC-16/MAXIM", models+ 67}, /* 44 */
{"CRC-16/MCRF4XX", models+ 26}, /* 45 */
{"CRC-16/OPENSAFETY-A", models+ 52}, /* 46 */
{"CRC-16/OPENSAFETY-B", models+ 62}, /* 47 */
{"CRC-16/PROFIBUS", models+ 34}, /* 48 */
{"CRC-16/RIELLO", models+ 22}, /* 49 */
{"CRC-16/SPI-FUJITSU", models+ 20}, /* 50 */
{"CRC-16/T10-DIF", models+ 81}, /* 51 */
{"CRC-16/TELEDISK", models+ 88}, /* 52 */
{"CRC-16/T10-DIF", models+ 82}, /* 51 */
{"CRC-16/TELEDISK", models+ 89}, /* 52 */
{"CRC-16/TMS37157", models+ 21}, /* 53 */
{"CRC-16/UMTS", models+ 64}, /* 54 */
{"CRC-16/USB", models+ 70}, /* 55 */
{"CRC-16/VERIFONE", models+ 64}, /* 56 */
{"CRC-17/CAN-FD", models+ 92}, /* 57 */
{"CRC-21/CAN-FD", models+ 76}, /* 58 */
{"CRC-24", models+ 78}, /* 59 */
{"CRC-16/UMTS", models+ 65}, /* 54 */
{"CRC-16/USB", models+ 71}, /* 55 */
{"CRC-16/VERIFONE", models+ 65}, /* 56 */
{"CRC-17/CAN-FD", models+ 93}, /* 57 */
{"CRC-21/CAN-FD", models+ 77}, /* 58 */
{"CRC-24", models+ 79}, /* 59 */
{"CRC-24/BLE", models+ 3}, /* 60 */
{"CRC-24/FLEXRAY-A", models+ 55}, /* 61 */
{"CRC-24/FLEXRAY-B", models+ 54}, /* 62 */
{"CRC-24/INTERLAKEN", models+ 43}, /* 63 */
{"CRC-24/LTE-A", models+ 77}, /* 64 */
{"CRC-24/LTE-A", models+ 78}, /* 64 */
{"CRC-24/LTE-B", models+ 63}, /* 65 */
{"CRC-24/OPENPGP", models+ 78}, /* 66 */
{"CRC-3/GSM", models+ 56}, /* 67 */
{"CRC-3/ROHC", models+ 57}, /* 68 */
{"CRC-30/CDMA", models+ 72}, /* 69 */
{"CRC-31/PHILIPS", models+ 14}, /* 70 */
{"CRC-32", models+ 8}, /* 71 */
{"CRC-32/AAL5", models+ 6}, /* 72 */
{"CRC-32/ADCCP", models+ 8}, /* 73 */
{"CRC-32/AUTOSAR", models+100}, /* 74 */
{"CRC-32/BZIP2", models+ 6}, /* 75 */
{"CRC-32/CASTAGNOLI", models+ 35}, /* 76 */
{"CRC-32/DECT-B", models+ 6}, /* 77 */
{"CRC-32/INTERLAKEN", models+ 35}, /* 78 */
{"CRC-32/ISCSI", models+ 35}, /* 79 */
{"CRC-32/MPEG-2", models+ 5}, /* 80 */
{"CRC-32/POSIX", models+ 4}, /* 81 */
{"CRC-32C", models+ 35}, /* 82 */
{"CRC-32D", models+ 91}, /* 83 */
{"CRC-32Q", models+ 75}, /* 84 */
{"CRC-4/INTERLAKEN", models+ 41}, /* 85 */
{"CRC-4/ITU", models+ 40}, /* 86 */
{"CRC-40/GSM", models+ 2}, /* 87 */
{"CRC-5/EPC", models+ 50}, /* 88 */
{"CRC-5/ITU", models+ 90}, /* 89 */
{"CRC-5/USB", models+ 37}, /* 90 */
{"CRC-6/CDMA2000-A", models+ 86}, /* 91 */
{"CRC-6/CDMA2000-B", models+ 29}, /* 92 */
{"CRC-6/DARC", models+ 59}, /* 93 */
{"CRC-6/GSM", models+ 93}, /* 94 */
{"CRC-6/ITU", models+ 15}, /* 95 */
{"CRC-64", models+ 47}, /* 96 */
{"CRC-64/ECMA-182", models+ 47}, /* 97 */
{"CRC-64/GO-ECMA", models+ 49}, /* 98 */
{"CRC-64/GO-ISO", models+ 0}, /* 99 */
{"CRC-64/WE", models+ 48}, /* 100 */
{"CRC-64/XZ", models+ 49}, /* 101 */
{"CRC-7", models+ 28}, /* 102 */
{"CRC-7/ROHC", models+ 87}, /* 103 */
{"CRC-7/UMTS", models+ 79}, /* 104 */
{"CRC-8", models+ 11}, /* 105 */
{"CRC-8/AES", models+ 33}, /* 106 */
{"CRC-8/AUTOSAR", models+ 39}, /* 107 */
{"CRC-8/BLUETOOTH", models+ 89}, /* 108 */
{"CRC-8/CDMA2000", models+ 85}, /* 109 */
{"CRC-8/DARC", models+ 44}, /* 110 */
{"CRC-8/DVB-S2", models+ 97}, /* 111 */
{"CRC-8/EBU", models+ 33}, /* 112 */
{"CRC-8/GSM-A", models+ 30}, /* 113 */
{"CRC-8/GSM-B", models+ 51}, /* 114 */
{"CRC-8/I-CODE", models+ 31}, /* 115 */
{"CRC-8/ITU", models+ 12}, /* 116 */
{"CRC-8/LTE", models+ 83}, /* 117 */
{"CRC-8/MAXIM", models+ 42}, /* 118 */
{"CRC-8/OPENSAFETY", models+ 38}, /* 119 */
{"CRC-8/ROHC", models+ 13}, /* 120 */
{"CRC-8/SAE-J1850", models+ 32}, /* 121 */
{"CRC-8/WCDMA", models+ 84}, /* 122 */
{"CRC-82/DARC", models+ 16}, /* 123 */
{"CRC-A", models+ 23}, /* 124 */
{"CRC-B", models+ 27}, /* 125 */
{"CRC-CCITT", models+ 19}, /* 126 */
{"CRC-IBM", models+ 65}, /* 127 */
{"DOW-CRC", models+ 42}, /* 128 */
{"JAMCRC", models+ 7}, /* 129 */
{"KERMIT", models+ 19}, /* 130 */
{"MODBUS", models+ 69}, /* 131 */
{"PKZIP", models+ 8}, /* 132 */
{"R-CRC-16", models+ 10}, /* 133 */
{"X-25", models+ 27}, /* 134 */
{"X-CRC-12", models+ 73}, /* 135 */
{"X-CRC-16", models+ 9}, /* 136 */
{"XFER", models+ 1}, /* 137 */
{"XMODEM", models+ 17}, /* 138 */
{"ZMODEM", models+ 17}, /* 139 */
{"CRC-24/OPENPGP", models+ 79}, /* 66 */
{"CRC-24/OS-9", models+ 64}, /* 67 */
{"CRC-3/GSM", models+ 56}, /* 68 */
{"CRC-3/ROHC", models+ 57}, /* 69 */
{"CRC-30/CDMA", models+ 73}, /* 70 */
{"CRC-31/PHILIPS", models+ 14}, /* 71 */
{"CRC-32", models+ 8}, /* 72 */
{"CRC-32/AAL5", models+ 6}, /* 73 */
{"CRC-32/ADCCP", models+ 8}, /* 74 */
{"CRC-32/AUTOSAR", models+101}, /* 75 */
{"CRC-32/BZIP2", models+ 6}, /* 76 */
{"CRC-32/CASTAGNOLI", models+ 35}, /* 77 */
{"CRC-32/DECT-B", models+ 6}, /* 78 */
{"CRC-32/INTERLAKEN", models+ 35}, /* 79 */
{"CRC-32/ISCSI", models+ 35}, /* 80 */
{"CRC-32/MPEG-2", models+ 5}, /* 81 */
{"CRC-32/POSIX", models+ 4}, /* 82 */
{"CRC-32C", models+ 35}, /* 83 */
{"CRC-32D", models+ 92}, /* 84 */
{"CRC-32Q", models+ 76}, /* 85 */
{"CRC-4/INTERLAKEN", models+ 41}, /* 86 */
{"CRC-4/ITU", models+ 40}, /* 87 */
{"CRC-40/GSM", models+ 2}, /* 88 */
{"CRC-5/EPC", models+ 50}, /* 89 */
{"CRC-5/ITU", models+ 91}, /* 90 */
{"CRC-5/USB", models+ 37}, /* 91 */
{"CRC-6/CDMA2000-A", models+ 87}, /* 92 */
{"CRC-6/CDMA2000-B", models+ 29}, /* 93 */
{"CRC-6/DARC", models+ 59}, /* 94 */
{"CRC-6/GSM", models+ 94}, /* 95 */
{"CRC-6/ITU", models+ 15}, /* 96 */
{"CRC-64", models+ 47}, /* 97 */
{"CRC-64/ECMA-182", models+ 47}, /* 98 */
{"CRC-64/GO-ECMA", models+ 49}, /* 99 */
{"CRC-64/GO-ISO", models+ 0}, /* 100 */
{"CRC-64/WE", models+ 48}, /* 101 */
{"CRC-64/XZ", models+ 49}, /* 102 */
{"CRC-7", models+ 28}, /* 103 */
{"CRC-7/ROHC", models+ 88}, /* 104 */
{"CRC-7/UMTS", models+ 80}, /* 105 */
{"CRC-8", models+ 11}, /* 106 */
{"CRC-8/AES", models+ 33}, /* 107 */
{"CRC-8/AUTOSAR", models+ 39}, /* 108 */
{"CRC-8/BLUETOOTH", models+ 90}, /* 109 */
{"CRC-8/CDMA2000", models+ 86}, /* 110 */
{"CRC-8/DARC", models+ 44}, /* 111 */
{"CRC-8/DVB-S2", models+ 98}, /* 112 */
{"CRC-8/EBU", models+ 33}, /* 113 */
{"CRC-8/GSM-A", models+ 30}, /* 114 */
{"CRC-8/GSM-B", models+ 51}, /* 115 */
{"CRC-8/I-CODE", models+ 31}, /* 116 */
{"CRC-8/ITU", models+ 12}, /* 117 */
{"CRC-8/LTE", models+ 84}, /* 118 */
{"CRC-8/MAXIM", models+ 42}, /* 119 */
{"CRC-8/OPENSAFETY", models+ 38}, /* 120 */
{"CRC-8/ROHC", models+ 13}, /* 121 */
{"CRC-8/SAE-J1850", models+ 32}, /* 122 */
{"CRC-8/WCDMA", models+ 85}, /* 123 */
{"CRC-82/DARC", models+ 16}, /* 124 */
{"CRC-A", models+ 23}, /* 125 */
{"CRC-B", models+ 27}, /* 126 */
{"CRC-CCITT", models+ 19}, /* 127 */
{"CRC-IBM", models+ 66}, /* 128 */
{"DOW-CRC", models+ 42}, /* 129 */
{"JAMCRC", models+ 7}, /* 130 */
{"KERMIT", models+ 19}, /* 131 */
{"MODBUS", models+ 70}, /* 132 */
{"PKZIP", models+ 8}, /* 133 */
{"R-CRC-16", models+ 10}, /* 134 */
{"X-25", models+ 27}, /* 135 */
{"X-CRC-12", models+ 74}, /* 136 */
{"X-CRC-16", models+ 9}, /* 137 */
{"XFER", models+ 1}, /* 138 */
{"XMODEM", models+ 17}, /* 139 */
{"ZMODEM", models+ 17}, /* 140 */
{NULL, NULL }, /* terminating entry */
};
# define NALIASES 140
# define NALIASES 141
# endif /* BMP_BIT */
#else /* PRESETS */

View file

@ -1,9 +1,9 @@
/* reveng.c
* Greg Cook, 7/Feb/2017
* Greg Cook, 26/Jul/2018
*/
/* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
* Gregory Cook
*
* This file is part of CRC RevEng.

View file

@ -1,9 +1,9 @@
/* reveng.h
* Greg Cook, 19/Jun/2017
* Greg Cook, 26/Jul/2018
*/
/* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
* Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
* Gregory Cook
*
* This file is part of CRC RevEng.
@ -93,7 +93,7 @@
/* Global definitions */
/* CRC RevEng version string */
#define VERSION "1.5.2"
#define VERSION "1.5.3"
/* bmpbit.c */
typedef BMP_T bmp_t;

View file

@ -456,15 +456,16 @@ static int l_sha1(lua_State *L) {
static int l_reveng_models(lua_State *L){
// This array needs to be adjusted if RevEng adds more crc-models.
#define NMODELS 103
int count = 0;
uint8_t in_width = luaL_checkunsigned(L, 1);
if ( in_width > 89 ) return returnToLuaWithError(L,"Width cannot exceed 89, got %d", in_width);
// This array needs to be adjusted if RevEng adds more crc-models.
uint8_t width[102];
uint8_t width[NMODELS];
memset(width, 0, sizeof(width));
// This array needs to be adjusted if RevEng adds more crc-models.
char *models[102];
char *models[NMODELS];
width[0] = in_width;