Hello community, here is the log from the commit of package reveng for openSUSE:Factory checked in at 2019-12-10 22:43:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/reveng (Old) and /work/SRC/openSUSE:Factory/.reveng.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "reveng" Tue Dec 10 22:43:33 2019 rev:7 rq:755497 version:2.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/reveng/reveng.changes 2019-11-19 12:59:54.706111866 +0100 +++ /work/SRC/openSUSE:Factory/.reveng.new.4691/reveng.changes 2019-12-10 22:43:50.541777527 +0100 @@ -1,0 +2,9 @@ +Mon Dec 9 19:35:01 UTC 2019 - Martin Hauke <mar...@gmx.de> + +- Update to version 2.1.0 + * Added -1 switch to skip equivalent forms. + * WIDTH may be specified before or after -i, -p, -q or -x. + * Warnings are given if POLY has no +1 term or if a search + is attempted with fewer than 4 codeword samples. + +------------------------------------------------------------------- Old: ---- reveng-2.0.3.tar.xz New: ---- reveng-2.1.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ reveng.spec ++++++ --- /var/tmp/diff_new_pack.ihzAlY/_old 2019-12-10 22:43:51.217777276 +0100 +++ /var/tmp/diff_new_pack.ihzAlY/_new 2019-12-10 22:43:51.221777275 +0100 @@ -18,7 +18,7 @@ Name: reveng -Version: 2.0.3 +Version: 2.1.0 Release: 0 Summary: An arbitrary-precision CRC calculator and algorithm finder License: GPL-3.0-or-later ++++++ reveng-2.0.3.tar.xz -> reveng-2.1.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/CHANGES new/reveng-2.1.0/CHANGES --- old/reveng-2.0.3/CHANGES 2019-11-18 18:45:26.000000000 +0100 +++ new/reveng-2.1.0/CHANGES 2019-12-07 21:24:41.000000000 +0100 @@ -19,11 +19,17 @@ Revision history of CRC RevEng -2.0.3 18 November 2019 +2.1.0 7 December 2019 + * Added -1 switch to skip equivalent forms. + * WIDTH may be specified before or after -i, -p, -q or -x. + * Warnings are given if POLY has no +1 term or if a search + is attempted with fewer than 4 codeword samples. + +2.0.3 21 November 2019 * Added tomtorfs-wrapper. * Revised poly class definitions and function entry conditions in poly.c. - * Added DFSFIX veneer for ARM Tube OS binary. + * Added DFSFIX utility for ARM Tube OS binary. 2.0.2 2 November 2019 * The memory allocation expands geometrically while reading diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/README new/reveng-2.1.0/README --- old/reveng-2.0.3/README 2019-11-02 17:05:30.000000000 +0100 +++ new/reveng-2.1.0/README 2019-12-07 21:25:15.000000000 +0100 @@ -108,7 +108,7 @@ SYNOPSIS -Usage: reveng -cdDesvhu? [-bBfFGlLMrStVXyz] +Usage: reveng -cdDesvhu? [-1bBfFGlLMrStVXyz] [-a BITS] [-A OBITS] [-i INIT] [-k KPOLY] [-m MODEL] [-p POLY] [-p POLY] [-P RPOLY] [-q QPOLY] [-w WIDTH] [-x XOROUT] [STRING...] Options: @@ -123,14 +123,14 @@ -w WIDTH register size, in bits -x XOROUT final register XOR value Modifier switches: - -b big-endian CRC -B big-endian CRC output - -f read files named in STRINGs -F skip preset model check pass - -G skip brute force search pass -l little-endian CRC - -L little-endian CRC output -M non-augmenting algorithm - -r right-justified output -S print spaces between characters - -t left-justified output -V reverse algorithm only - -X print uppercase hexadecimal -y low bytes first in files - -z raw binary STRINGs + -1 skip equivalent forms -b big-endian CRC + -B big-endian CRC output -f read files named in STRINGs + -F skip preset model check pass -G skip brute force search pass + -l little-endian CRC -L little-endian CRC output + -M non-augmenting algorithm -r right-justified output + -S print spaces between chars -t left-justified output + -V reverse algorithm only -X print uppercase hexadecimal + -y low bytes first in files -z raw binary STRINGs Mode switches: -c calculate CRCs -d dump algorithm parameters -D list preset algorithms -e echo (and reformat) input @@ -173,8 +173,6 @@ -i INIT A hexadecimal digit string specifying the initial value to set in the shift register before computing the CRC. - The width must be specified with -k, -m, -P or -w - before -i INIT. -k KPOLY The generator polynomial (see -p), written in the hexadecimal, reversed-reciprocal notation found in @@ -199,7 +197,8 @@ author's "Catalogue of parametrised CRC algorithms", as of the date of this release. The preset models can be listed with -D. - -M, -r, -S, -t, -X, -y and -z must not precede -m MODEL. + -1, -M, -r, -S, -t, -X, -y and -z must not precede + -m MODEL. -p POLY The Poly value, that is, the generator polynomial that sets the feedback tap positions of the shift register. @@ -208,8 +207,6 @@ omitted, thus 0x18005 is specified as 8005. -p also sets the start of the range for polynomial range searching, see -q. - The width must be specified with -k, -m, -P or -w - before -p POLY. -P RPOLY The generator polynomial (see -p), written in the hexadecimal, reversed notation found in LSB-first code. @@ -229,8 +226,6 @@ -x XOROUT A hexadecimal digit string specifying the value to be added to the final shift register value before output. - The width must be specified with -k, -m, -P or -w - before -x XOROUT. Other model-related options: @@ -555,15 +550,16 @@ endianness. In such cases -s returns the big- and little-endian forms of each algorithm found. The Check values of these forms will differ, as they are always calculated on the 8-bit UTF-8 string "123456789". -The Residue values will be each other's mirror images. +The Residue values will be each other's mirror images in binary. Each CRC algorithm whose generator polynomial is a multiple of (x + 1) -has one or more aliases. Aliases differ in Init, XorOut and Residue -values, but they produce identical CRCs at all message lengths. -Therefore unless -i INIT or -x XOROUT are specified, any such algorithm -and its aliases are always returned together, no matter how many -codewords are given. (If (x + 1) appears n times in the factorisation -of G(x), then there shall be 2^n - 1 aliases.) +has one or more equivalent forms. Equivalent forms differ in Init, +XorOut and Residue values, but they produce identical CRCs at all +message lengths. Therefore unless -1, -i INIT or -x XOROUT are +specified, any such algorithm and its equivalent forms are always +returned together, no matter how many codewords are given. (If (x + 1) +appears n times in the factorisation of G(x), then there shall be +2^n - 1 equivalent forms.) POLYNOMIAL RANGE SEARCHING @@ -623,6 +619,13 @@ The full list of search options is as follows: + -1 + Skip (do not list) the equivalent forms of each + model found during the brute force search pass; Ewing's + algorithm is terminated after finding the lexically + least solution to Init. + The form that is listed may not necessarily match + the definition printed in a specification document. -F Skip the preset model check pass. (Not recommended.) -G @@ -688,9 +691,9 @@ is a search tool. The return of a CRC model as a search result is a statement that all the given codeword samples satisfy that model, not a proof that the model, or any CRC algorithm at all, produced those -samples. Any particular search result may be a fluke, especially from a -small number of samples. Also any output is only as accurate as the -input. +samples. Any particular search result may be a false positive, +especially from a small number of samples. Also any output is only as +accurate as the input. Model reversal (-V, -v) makes little sense on crossed-endian models. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/RISCOSify new/reveng-2.1.0/RISCOSify --- old/reveng-2.0.3/RISCOSify 2019-11-18 18:51:15.000000000 +0100 +++ new/reveng-2.1.0/RISCOSify 2019-11-21 17:26:06.000000000 +0100 @@ -1,5 +1,5 @@ | RISCOSify -| Greg Cook, 18/Nov/2019 +| Greg Cook, 21/Nov/2019 | CRC RevEng: arbitrary-precision CRC calculator and algorithm finder | Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, @@ -32,6 +32,7 @@ IfThere <CRCRevEng$Dir>.bin.armtubeos.README Then SetType <CRCRevEng$Dir>.bin.armtubeos.README &FFF IfThere <CRCRevEng$Dir>.bin.armtubeos.reveng Then SetType <CRCRevEng$Dir>.bin.armtubeos.reveng &FF8 IfThere <CRCRevEng$Dir>.bin.armtubeos.reveng/inf Then SetType <CRCRevEng$Dir>.bin.armtubeos.reveng/inf &FFF +IfThere <CRCRevEng$Dir>.bin.armtubeos.SetAddress Then SetType <CRCRevEng$Dir>.bin.armtubeos.SetAddress &FFB IfThere <CRCRevEng$Dir>.bin.i386-linux.reveng Then SetType <CRCRevEng$Dir>.bin.i386-linux.reveng &FE6 IfThere <CRCRevEng$Dir>.bin.raspbian.reveng Then SetType <CRCRevEng$Dir>.bin.raspbian.reveng &FE6 IfThere <CRCRevEng$Dir>.bin.riscos.ReadMe/txt Then SetType <CRCRevEng$Dir>.bin.riscos.ReadMe/txt &FFF @@ -69,6 +70,7 @@ IfThere <CRCRevEng$Dir>.reveng/ico Then SetType <CRCRevEng$Dir>.reveng/ico &132 IfThere <CRCRevEng$Dir>.reveng/rc Then SetType <CRCRevEng$Dir>.reveng/rc &FFF IfThere <CRCRevEng$Dir>.tomtorfs-wrapper Then SetType <CRCRevEng$Dir>.tomtorfs-wrapper &FFF +IfThere <CRCRevEng$Dir>.bin.armtubeos.SetAddress Then BASIC -quit <CRCRevEng$Dir>.bin.armtubeos.SetAddress CDir <CRCRevEng$Dir>.c CDir <CRCRevEng$Dir>.h CDir <CRCRevEng$Dir>.o diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/bin/armtubeos/README new/reveng-2.1.0/bin/armtubeos/README --- old/reveng-2.0.3/bin/armtubeos/README 2019-11-18 18:41:48.000000000 +0100 +++ new/reveng-2.1.0/bin/armtubeos/README 2019-11-21 16:39:02.000000000 +0100 @@ -1,5 +1,5 @@ System requirements of ARM Tube OS binary -Greg Cook, 18 November 2019 +Greg Cook, 21 November 2019 CRC RevEng has been tested on a 16MB SPROW ARM7TDMI Coprocessor running ARM Tube OS version 0.45, with OS 1.20 on the host. Installation on @@ -8,16 +8,16 @@ - OPUS EDOS 0.4, patched by EDOSPAT versions 4.90, 5.40 or 6.03 - Acorn DFS 2.26, as supplied with the GoMMC interface (PDFS226.BIN), - with DFSFIX installed (see below) + with DFSfix installed (see below) To load and run the ARM Tube OS binary successfully, the Disc Filing System (DFS) on the host computer must support at least the following: - Full 32-bit address handling within *RUN (image loading and execution) - Ability to load images >64 KiB to the coprocessor. - Tolerance of OSARGS calls with A=2, Y=0 (read NFS version). -- OSFIND must support reason codes with bit 3 set and tolerate reason - codes with bit 2 set (see RISC OS 3 Programmer's Reference Manual, - volume 2, page 79) +- The functions performed by DFSfix must be implemented, either as + faithful emulations of RISC OS or by translation to similar existing + calls. Once CRC RevEng has been loaded and executed, it can be reinvoked without reloading the image, using *Go:- @@ -43,24 +43,24 @@ The ARM Tube OS binary also runs as a statically-linked image under RISC OS, at twice the size of the RISC OS binary. -DFSFIX +DFSfix -This is a small veneer which installs itself over the host's filing +This is a small utility which installs itself over the host's filing system, and emulates just enough of RISC OS's FileSwitch API for simple RISC OS programs using the ANSI C Library to read and write files to Acorn DFS through the ARM Tube OS. -DFSFIX is only for use with Acorn DFS. +DFSfix is only for use with Acorn DFS. -To install DFSFIX, enter the following (once) after pressing BREAK: +To install DFSfix, enter the following (once) after pressing BREAK: - *DFSFIX + *dfsfix The supplied binary is assembled to reside in the sector buffer of file handle &15. This retains compatibility with all the BBC Micro's facilities, as long as at most four files are opened simultaneously - a limit seldom reached in practice. -The assembler program listing for DFSFIX is included, to allow +The assembler program listing for DFSfix is included, to allow reassembly to another base address or selection of extended features. Assembly options are documented in the listing. Binary files old/reveng-2.0.3/bin/armtubeos/SetAddress and new/reveng-2.1.0/bin/armtubeos/SetAddress differ Binary files old/reveng-2.0.3/bin/armtubeos/dfsfix and new/reveng-2.1.0/bin/armtubeos/dfsfix differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/bin/armtubeos/dfsfix.inf new/reveng-2.1.0/bin/armtubeos/dfsfix.inf --- old/reveng-2.0.3/bin/armtubeos/dfsfix.inf 2019-11-18 18:16:23.000000000 +0100 +++ new/reveng-2.1.0/bin/armtubeos/dfsfix.inf 2019-11-26 22:34:47.000000000 +0100 @@ -1 +1 @@ -$.DFSFIX FFFF1600 FFFF1600 00FE CRC=D806 +$.dfsfix FFFF1600 FFFF1600 00FD CRC=629B diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/bin/armtubeos/dfsfix.txt new/reveng-2.1.0/bin/armtubeos/dfsfix.txt --- old/reveng-2.0.3/bin/armtubeos/dfsfix.txt 2019-11-18 18:16:06.000000000 +0100 +++ new/reveng-2.1.0/bin/armtubeos/dfsfix.txt 2019-11-26 21:30:39.000000000 +0100 @@ -1,39 +1,39 @@ *| dfsfix.txt -*| Greg Cook, 18 November 2019 +*| Greg Cook, 26 November 2019 *| -*| This is a small veneer which installs itself over the host's filing +*| This is a small utility which installs itself over the host's filing *| system, and emulates just enough of RISC OS's FileSwitch API for simple *| RISC OS programs using the ANSI C Library to read and write files to *| Acorn DFS through the ARM Tube OS. *| *| Functions performed: -*| OSFILE: A=7, A=11 translated to A=0; A=9 translated to A=5. -*| OSARGS: A=3,Y>0 (set EXT) implemented. +*| OSFILE: A=7, A=11 translated to A=0; A=9 translated to A=1. +*| OSARGS: A=3, Y>0 (set EXT) implemented. *| OSGBPB: A=1..4 clears the EOF warning flag. *| If DFS returns A>0, optionally sets C=1 or C=1 iff L>0. -*| OSFIND: passes only b7,b6 to DFS. Raises "Not found" error iff -*| b6,b3 are both set and DFS returns A=0 (no file handle.) +*| OSFIND: passes only b7..6 of A to DFS. Raises "Not found" error iff +*| b6, b3 are both set and DFS returns A=0 (no file handle.) *| *| Caveats: *| A is undefined on exit from OSARGS 3,Y. *| The underlying OSARGS and OSGBPB are expected to raise an error *| if the file handle is invalid. -*| Installing DFSFIX over a filing system other than its intended FS +*| Installing DFSfix over a filing system other than its intended FS *| results in undefined behaviour. -*| Installing DFSFIX twice after pressing BREAK hangs the machine. +*| Installing DFSfix twice after pressing BREAK hangs the machine. *| *| Recommended assembly options: -*| 1600,Y,N,N,Y,S (Acorn DFS, 254 bytes) -*| 1500,Y,Y,N,N,L (Unpatched Opus EDOS 0.4, 254 bytes) +*| 1600,Y,N,N,Y,S (Acorn DFS, 253 bytes) +*| 1500,Y,Y,N,N,L (Unpatched Opus EDOS 0.4, 253 bytes) *| *| Assembly options: *| Address (&1400): & -*| Assemble DFSFIX starting at this address. Press RETURN to use the +*| Assemble DFSfix starting at this address. Press RETURN to use the *| default address of &1400, or type a hexadecimal address (after the *| &) and then press RETURN. -*| Where DFSFIX resides determines which of the BBC Micro's facilities +*| Where DFSfix resides determines which of the BBC Micro's facilities *| remain available. -*| DFSFIX can be placed for instance at:- +*| DFSfix can be placed for instance at:- *| &B00, in place of function key expansions *| &C00, in place of user-defined characters *| &1400, in place of sector buffer &13..14 (DFS) / &14..&15 (EDOS) @@ -41,19 +41,19 @@ *| &1600, in place of sector buffer &15 (DFS) *| &6800, in place of graphics display modes, clear of the BASIC *| program, heap and stack -*| Thus an assembly address of &1400 leaves two file handles free in -*| DFS and three in EDOS. -*| DFSFIX without options assembles to 193 bytes of routines + 41 byte -*| installer erasable after use = 234 (&EA) bytes. +*| Thus an assembly address of &1400 leaves file handles &11..&12 free +*| in DFS and &11..&13 free in EDOS. +*| DFSfix without options assembles to 192 bytes of routines + 41 byte +*| installer erasable after use = 233 (&E9) bytes. *| The address need not be page-aligned, but remember that 256 or 512 -*| bytes of memory will be overwritten when DFSFIX is loaded. +*| bytes of memory will be overwritten when DFSfix is loaded. *| *| Installer first? (Y/N): *| Typing Y places the installer before the routines. This usually *| causes the execution address to equal the load address. *| *| For old EDOS? (Y/N): Y adds 3 bytes -*| Assembles DFSFIX for Acorn DFS (N) or any version of Opus EDOS (Y). +*| Assembles DFSfix for Acorn DFS (N) or any version of Opus EDOS (Y). *| Decides where PTR, EXT and the EOF warning flag are located. *| Type N here as the EDOS version is only for testing, and EDOSPAT *| carries out all these functions better. @@ -72,7 +72,7 @@ *| beyond the end of the file. *| This is a normal condition in some filing systems, where setting *| PTR makes no changes to the file and only takes effect on the next -*| write operation. Type N for use with EDOS and other such filing +*| read or write. Type N for use with EDOS and other such filing *| systems, where OSARGS 1,Y and 3,Y may be expected to act *| independently. *| However the RISC OS PRM defines that setting EXT shall leave PTR @@ -89,36 +89,36 @@ *| *| C if OSGBPB returns A>0:- *| Preserve / Set / Set iff L>0 (P/S/L): S adds 3 bytes, L adds 17 bytes -*| Tells DFSFIX what to do with the carry flag when the underlying -*| OSARGS routine returns a nonzero A register. This implies an -*| illegal use of A, an unimplemented OSARGS call, or a filing system +*| Tells DFSfix what to do with the carry flag when the underlying +*| OSGBPB routine returns a nonzero A register. This implies an +*| illegal use of A, an unimplemented OSGBPB call, or a filing system *| that implements the call but improperly preserves the call number. -*| With P, DFSFIX does not interfere, passing whatever carry flag -*| (and accumulator) was returned from OSARGS. -*| With S, DFSFIX returns C=1; the user can then tell solely from C=1 +*| With P, DFSfix does not interfere, passing whatever carry flag +*| (and accumulator) was returned from OSGBPB. +*| With S, DFSfix returns C=1; the user can then tell solely from C=1 *| that there was a problem with his or her call. -*| With L, DFSFIX sets C=1 if the length field at XY+5..8 indicates +*| With L, DFSfix sets C=1 if the length field at XY+5..8 indicates *| that one or more bytes were not transferred, C=0 otherwise. *| This covers for EDOS when A=1..4 or 8. *| Knowing that a filing system is indeed there, more complex code can *| return the appropriate carry flag; but this is beyond the scope of -*| DFSFIX. +*| DFSfix. *| *| Save? (Y/N): -*| Type Y to save DFSFIX to disc as well or N to generate only the +*| Type Y to save DFSfix to disc as well or N to generate only the *| assembly listing. *| *| Page aligned file? (Y/N): -*| Type Y to save DFSFIX starting at a page boundary, so that less -*| data beyond the DFSFIX code may be overwritten when loading. -*| Type N to save DFSFIX starting at the code. +*| Type Y to save DFSfix starting at a page boundary, so that less +*| data beyond the DFSfix code may be overwritten when loading. +*| Type N to save DFSfix starting at the code. *| Where the code is page aligned, the option is not given. *BASIC NEW AUTO REM >A.DFSFIX -REM Greg Cook 18/Nov/2019 16:28 +REM Greg Cook 26/Nov/2019 20:30 REM Reportedly unused space in the Econet area REM http://mdfs.net/Docs/Comp/BBC/AllMem @@ -246,29 +246,31 @@ STA channel_eof_warning_flag,Y RTS : -.filewrap_5 -LDA #5 +.filewrap_0 +LDA #9 EOR 1 EOR 0 +.filewrap_1 +EOR #9 EOR 1 .filewrap CMP #7 BEQ filewrap_0 CMP #9 -BEQ filewrap_5 +BEQ filewrap_1 CMP #11 -BNE filewrap_jmp -.filewrap_0 -LDA #0 +BEQ filewrap_0 .filewrap_jmp JMP filewrap : .argswrap -CPY #1 -BCC argswrap_jmp CMP #3 BNE argswrap_jmp +CPY #1 +BCC argswrap_jmp +CLC +.argswrap_temp_ptr TXA PHA LDA #0 -.argswrap_temp_ptr +ROL A LDX #tempptr JSR argswrap_jmp PLA @@ -314,10 +316,8 @@ LDA #0 JSR osbput JSR argswrap_jmp -TXA -PHA -LDA #1 -BNE argswrap_temp_ptr +SEC +BCS argswrap_temp_ptr ] IF clampptr% THEN [OPT pass%:.argswrap_ply_set_ptr:PLA:TAY:] [OPT pass% @@ -413,7 +413,7 @@ DEF PROCasm_edos [OPT pass% -\return Y=A*0x18 for y=1..7 +\return Y=A*&18 for y=1..7 AND #&07 TAY \BEQ routines_edos_exit @@ -459,7 +459,7 @@ LOCAL A%,X%,Y% X%=osblock% Y%=X% DIV 256 -$filename%="DFSFIX" +$filename%="dfsfix" !osblock%=filename% osblock%!2=&FFFF0000 OR base% osblock%!6=&FFFF0000 OR install Binary files old/reveng-2.0.3/bin/armtubeos/reveng and new/reveng-2.1.0/bin/armtubeos/reveng differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/bin/armtubeos/reveng.inf new/reveng-2.1.0/bin/armtubeos/reveng.inf --- old/reveng-2.0.3/bin/armtubeos/reveng.inf 2019-11-18 20:56:36.000000000 +0100 +++ new/reveng-2.1.0/bin/armtubeos/reveng.inf 2019-12-08 17:42:12.000000000 +0100 @@ -1 +1 @@ -$.reveng 8000 8000 10D6F CRC=5F47 +$.reveng 8000 8000 10CFF CRC=DB86 Binary files old/reveng-2.0.3/bin/i386-linux/reveng and new/reveng-2.1.0/bin/i386-linux/reveng differ Binary files old/reveng-2.0.3/bin/raspbian/reveng and new/reveng-2.1.0/bin/raspbian/reveng differ Binary files old/reveng-2.0.3/bin/riscos/!System/310/Modules/CLib and new/reveng-2.1.0/bin/riscos/!System/310/Modules/CLib differ Binary files old/reveng-2.0.3/bin/riscos/!System/500/Modules/CLib and new/reveng-2.1.0/bin/riscos/!System/500/Modules/CLib differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/bin/riscos/ReadMe.txt new/reveng-2.1.0/bin/riscos/ReadMe.txt --- old/reveng-2.0.3/bin/riscos/ReadMe.txt 2012-10-16 01:29:52.000000000 +0200 +++ new/reveng-2.1.0/bin/riscos/ReadMe.txt 2018-07-30 14:08:40.000000000 +0200 @@ -16,11 +16,11 @@ method, direct your users to download and install the "System resources" from here: - http://www.riscosopen.org/content/downloads/other-zipfiles + https://www.riscosopen.org/content/downloads/common Direct link: - https://www.riscosopen.org/zipfiles/misc/PlingSystem.zip + https://www.riscosopen.org/zipfiles/platform/common/PlingSystem.zip You can also redistribute the web site version of !System with a non-commercial product, as long as you comply with the terms of the shared @@ -30,8 +30,8 @@ Special considerations for RISC OS Select ========================================= -Some versions of RISC OS Select, particulally 4.29, will require a patch +Some versions of RISC OS Select, particularly 4.29, will require a patch before the 32bit Shared C Library can be loaded. Please note that currently -RISCOS Ltd. will be unable to provide support any system while the new CLib +RISCOS Ltd. will be unable to provide support to any system while the new CLib is in use. This patch can be applied by copying the !Boot shell in the 'Select_429' directory over the existing !Boot. Binary files old/reveng-2.0.3/bin/riscos/reveng and new/reveng-2.1.0/bin/riscos/reveng differ Binary files old/reveng-2.0.3/bin/win32/reveng.exe and new/reveng-2.1.0/bin/win32/reveng.exe differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/cli.c new/reveng-2.1.0/cli.c --- old/reveng-2.0.3/cli.c 2019-11-11 17:15:01.000000000 +0100 +++ new/reveng-2.1.0/cli.c 2019-12-08 13:59:53.000000000 +0100 @@ -1,5 +1,5 @@ /* cli.c - * Greg Cook, 11/Nov/2019 + * Greg Cook, 8/Dec/2019 */ /* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder @@ -22,7 +22,8 @@ * along with CRC RevEng. If not, see <https://www.gnu.org/licenses/>. */ -/* 2019-11-01: initialize optind, opterr +/* 2019-12-07: -impqwx in any order; warn if LSB of poly unset + * 2019-11-01: initialize optind, opterr * 2019-11-01: grow poly geometrically in rdpoly() * 2019-03-24: error message also requests -P before -s * 2018-07-26: NOFORCE renamed ALWPCK @@ -67,6 +68,15 @@ #include "reveng.h" +#define C_INFILE 1 +#define C_NOPCK 2 +#define C_NOBFS 4 +#define C_RESULT 8 + +#define BUFFER 32768 +#define GSCALE 4 +#define RECSMP 4 + static FILE *oread(const char *); static poly_t rdpoly(const char *, int, int); static void usage(void); @@ -107,8 +117,11 @@ SETBMP(); do { - c=getopt(argc, argv, "?A:BDFGLMP:SVXa:bcdefhi:k:lm:p:q:rstuvw:x:yz"); + c=getopt(argc, argv, "?1A:BDFGLMP:SVXa:bcdefhi:k:lm:p:q:rstuvw:x:yz"); switch(c) { + case '1': /* 1 skip equivalent forms */ + model.flags |= P_EXHST; + break; case 'A': /* A: bits per output character */ case 'a': /* a: bits per character */ if((obperhx = atoi(optarg)) > BMP_BIT) { @@ -207,8 +220,22 @@ ipqx: pfree(pptr); *pptr = strtop(optarg, 0, 4); - pright(pptr, width); mnovel(&model); + /* warn user if bottom bit of poly unset */ + if(c == 'p' && plen(model.spoly)) { + apoly = psubs(model.spoly, 0UL, + plen(model.spoly)-1UL, + plen(model.spoly), 0UL); + if(ptst(apoly)) { + pfree(&apoly); + } else { + fprintf(stderr, "%s: warning: " + "POLY has no +1 term; " + "did you mean -P %s?\n", + myname, optarg); + pfree(&apoly); + } + } break; case 'q': /* q: range end polynomial */ pptr = &qpoly; @@ -248,6 +275,15 @@ } } while(c != -1); + + /* expand or trim parameters, right-aligned, to whichever width + * we have now. -w, -p, -i and -x can be specified in any order. + */ + pright(&model.spoly, width); + pright(&model.init, width); + pright(&model.xorout, width); + pright(&qpoly, width); + /* canonicalise the model, so the one we dump is the one we * calculate with (not with -s, spoly may be blank which will * normalise to zero and clear init and xorout.) @@ -369,8 +405,23 @@ if(!ptst(qpoly)) rflags &= ~R_HAVEQ; - /* allocate argument array */ + /* warn if searching with few arguments */ args = argc - optind; + if(!args) + fprintf(stderr, "%s: warning: you have " + "not given any samples\n", + myname); + else if(args < RECSMP) { + fprintf(stderr, "%s: warning: you have " + "only given %d sample%s\n", + myname, args, + (args == 1) ? "" : "s"); + fprintf(stderr, "%s: warning: to reduce " + "false positives, give %d or " + "more samples\n", myname, RECSMP); + } + + /* allocate argument array */ if(!(apolys = malloc(args * sizeof(poly_t)))) uerror("cannot allocate memory for argument list"); @@ -549,7 +600,7 @@ praloc(&apoly, total); if(ferror(input)) { - fprintf(stderr,"%s: error condition on file '%s'\n", myname, name); + fprintf(stderr,"%s: %s: error condition on file\n", myname, name); exit(EXIT_FAILURE); } /* close file unless stdin */ @@ -557,7 +608,7 @@ /* reset EOF condition */ clearerr(input); else if(fclose(input)) { - fprintf(stderr,"%s: error closing file '%s'\n", myname, name); + fprintf(stderr,"%s: %s: error closing file\n", myname, name); exit(EXIT_FAILURE); } return(apoly); @@ -572,7 +623,7 @@ if(*name == '-' && name[1] == '\0') return(stdin); if(!(handle = fopen(name, "rb"))) { - fprintf(stderr, "%s: cannot open '%s' for reading\n", myname, name); + fprintf(stderr, "%s: %s: cannot open for reading\n", myname, name); exit(EXIT_FAILURE); } return(handle); @@ -586,7 +637,7 @@ "Usage:\t"); fputs(myname, stderr); fprintf(stderr, - "\t-cdDesvhu? [-bBfFGlLMrStVXyz]\n" + "\t-cdDesvhu? [-1bBfFGlLMrStVXyz]\n" "\t[-a BITS] [-A OBITS] [-i INIT] [-k KPOLY] [-m MODEL] [-p POLY]\n" "\t[-p POLY] [-P RPOLY] [-q QPOLY] [-w WIDTH] [-x XOROUT] [STRING...]\n" "Options:\n" @@ -603,14 +654,14 @@ "\t-w WIDTH\tregister size, in bits\n" "\t-x XOROUT\tfinal register XOR value\n" "Modifier switches:\n" - "\t-b big-endian CRC\t\t-B big-endian CRC output\n" - "\t-f read files named in STRINGs\t-F skip preset model check pass\n" - "\t-G skip brute force search pass\t-l little-endian CRC\n" - "\t-L little-endian CRC output\t-M non-augmenting algorithm\n" - "\t-r right-justified output\t-S print spaces between characters\n" - "\t-t left-justified output\t-V reverse algorithm only\n" - "\t-X print uppercase hexadecimal\t-y low bytes first in files\n" - "\t-z raw binary STRINGs\n"); + "\t-1 skip equivalent forms\t-b big-endian CRC\n" + "\t-B big-endian CRC output\t-f read files named in STRINGs\n" + "\t-F skip preset model check pass\t-G skip brute force search pass\n" + "\t-l little-endian CRC\t\t-L little-endian CRC output\n" + "\t-M non-augmenting algorithm\t-r right-justified output\n" + "\t-S print spaces between chars\t-t left-justified output\n" + "\t-V reverse algorithm only\t-X print uppercase hexadecimal\n" + "\t-y low bytes first in files\t-z raw binary STRINGs\n"); fprintf(stderr, "Mode switches:\n" "\t-c calculate CRCs\t\t-d dump algorithm parameters\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/reveng.c new/reveng-2.1.0/reveng.c --- old/reveng-2.0.3/reveng.c 2019-05-09 23:20:38.000000000 +0200 +++ new/reveng-2.1.0/reveng.c 2019-12-07 23:26:30.000000000 +0100 @@ -1,5 +1,5 @@ /* reveng.c - * Greg Cook, 9/May/2019 + * Greg Cook, 7/Dec/2019 */ /* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder @@ -22,7 +22,8 @@ * along with CRC RevEng. If not, see <https://www.gnu.org/licenses/>. */ -/* 2019-04-30: brute-force short factor if shortest diff <= 2n +/* 2019-12-07: skip equivalent forms + * 2019-04-30: brute-force short factor if shortest diff <= 2n * 2013-09-16: calini(), calout() work on shortest argument * 2013-06-11: added sequence number to uprog() calls * 2013-02-08: added polynomial range search @@ -407,7 +408,7 @@ /* Solve the matrix by Gaussian elimination. * The parity of the result, masked by each row, should be even. */ - cy = 1; + cy = P_EXHST; apoly = pclone(bpoly); jptr = mat + dlen; for(i=0UL; i<dlen; ++i) { @@ -419,7 +420,7 @@ if(pident(*jptr, pzero)) { /* 0 to 1, no carry */ *jptr = bpoly; - cy = 0; + cy &= flags; } else if(pident(*jptr, bpoly)) { /* 1 to 0, carry forward */ *jptr = pzero; @@ -435,11 +436,14 @@ pfree(&apoly); } while(!cy); pfree(&pone); - pfree(&bpoly); /* Free the matrix. */ for(jptr=mat; jptr < mat + (dlen << 1); ++jptr) - pfree(jptr); + if(pident(*jptr, bpoly)) + *jptr = pzero; + else + pfree(jptr); + pfree(&bpoly); free(mat); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/reveng.h new/reveng-2.1.0/reveng.h --- old/reveng-2.0.3/reveng.h 2019-11-18 20:18:51.000000000 +0100 +++ new/reveng-2.1.0/reveng.h 2019-12-07 21:50:23.000000000 +0100 @@ -1,5 +1,5 @@ /* reveng.h - * Greg Cook, 18/Nov/2019 + * Greg Cook, 7/Dec/2019 */ /* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder @@ -93,7 +93,7 @@ /* Global definitions */ /* CRC RevEng version string */ -#define VERSION "2.0.3" +#define VERSION "2.1.0" /* bmpbit.c */ typedef BMP_T bmp_t; @@ -110,11 +110,12 @@ #define P_SPACE 32 #define P_LTLBYT 64 #define P_DIRECT 128 +#define P_EXHST 256 /* class flags */ -#define P_CLBIT0 256 -#define P_CLBIT1 512 -#define P_SOLID 1024 +#define P_CLBIT0 512 +#define P_CLBIT1 1024 +#define P_SOLID 2048 #define P_CLMASK (P_SOLID | P_CLBIT1 | P_CLBIT0) #define P_UNDFCL 0 @@ -222,14 +223,6 @@ extern model_t *reveng(const model_t *guess, const poly_t qpoly, int rflags, int args, const poly_t *argpolys); /* cli.c */ -#define C_INFILE 1 -#define C_NOPCK 2 -#define C_NOBFS 4 -#define C_RESULT 8 - -#define BUFFER 32768 -#define GSCALE 4 - extern int main(int argc, char *argv[]); extern void ufound(const model_t *model); extern void uerror(const char *msg); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/reveng.rc new/reveng-2.1.0/reveng.rc --- old/reveng-2.0.3/reveng.rc 2019-11-18 20:19:27.000000000 +0100 +++ new/reveng-2.1.0/reveng.rc 2019-12-07 21:51:13.000000000 +0100 @@ -1,5 +1,5 @@ /* reveng.rc - * Greg Cook, 18/Nov/2019 + * Greg Cook, 7/Dec/2019 */ /* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder @@ -30,11 +30,11 @@ #include <windows.h> -#define VER_FILEVERSION 2,0,3,0 -#define VER_FILEVERSION_STR "2.0.3.0\0" +#define VER_FILEVERSION 2,1,0,0 +#define VER_FILEVERSION_STR "2.1.0.0\0" -#define VER_PRODUCTVERSION 2,0,3,0 -#define VER_PRODUCTVERSION_STR "2.0.3\0" +#define VER_PRODUCTVERSION 2,1,0,0 +#define VER_PRODUCTVERSION_STR "2.1.0\0" #ifndef DEBUG #define VER_DEBUG 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reveng-2.0.3/tomtorfs-wrapper new/reveng-2.1.0/tomtorfs-wrapper --- old/reveng-2.0.3/tomtorfs-wrapper 2019-11-06 21:59:38.000000000 +0100 +++ new/reveng-2.1.0/tomtorfs-wrapper 2019-11-21 18:32:11.000000000 +0100 @@ -1,7 +1,6 @@ #!/bin/sh - # tomtorfs-wrapper -# Greg Cook, 6/Nov/2019 +# Greg Cook, 20/Nov/2019 # CRC RevEng: arbitrary-precision CRC calculator and algorithm finder # Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, @@ -49,7 +48,7 @@ # <http://reveng.sourceforge.net/readme.htm> # Lammert Bies, "Error detection and correction" Web forum. # <https://www.lammertbies.nl/forum/viewforum.php?f=11> -# Tom Torfs, IOCCC winning entry, 1998, CRC generator +# Tom Torfs, IOCCC winning entry, 1998, CRC generator. # <https://www.ioccc.org/years.html#1998_tomtorfs> REVENG="reveng"