Hello community,

here is the log from the commit of package reveng for openSUSE:Factory checked 
in at 2019-11-19 12:59:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/reveng (Old)
 and      /work/SRC/openSUSE:Factory/.reveng.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "reveng"

Tue Nov 19 12:59:52 2019 rev:6 rq:749477 version:2.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/reveng/reveng.changes    2019-11-06 
13:56:53.676207453 +0100
+++ /work/SRC/openSUSE:Factory/.reveng.new.26869/reveng.changes 2019-11-19 
12:59:54.706111866 +0100
@@ -1,0 +2,15 @@
+Mon Nov 18 21:32:19 UTC 2019 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 2.0.3
+  * Added tomtorfs-wrapper.
+  * Revised poly class definitions and function entry conditions
+    in poly.c.
+  * Added DFSFIX veneer for ARM Tube OS binary.
+
+-------------------------------------------------------------------
+Mon Nov  4 18:48:53 UTC 2019 - Martin Hauke <mar...@gmx.de>
+
+- Revert to http download since obs seems to have some issues
+  with https downloads from sourceforge
+
+-------------------------------------------------------------------

Old:
----
  reveng-2.0.2.tar.xz

New:
----
  reveng-2.0.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ reveng.spec ++++++
--- /var/tmp/diff_new_pack.L3Oavo/_old  2019-11-19 12:59:55.474111381 +0100
+++ /var/tmp/diff_new_pack.L3Oavo/_new  2019-11-19 12:59:55.478111379 +0100
@@ -18,13 +18,13 @@
 
 
 Name:           reveng
-Version:        2.0.2
+Version:        2.0.3
 Release:        0
 Summary:        An arbitrary-precision CRC calculator and algorithm finder
 License:        GPL-3.0-or-later
 Group:          Development/Tools/Other
 URL:            http://reveng.sourceforge.net/
-Source:         
https://sourceforge.net/projects/%{name}/files/%{version}/%{name}-%{version}.tar.xz
+Source:         
http://sourceforge.net/projects/%{name}/files/%{version}/%{name}-%{version}.tar.xz
 Patch0:         reveng-dont-strip.patch
 Patch1:         reveng-obey-cflags.patch
 Patch2:         reveng-presets_x86_64.patch

++++++ reveng-2.0.2.tar.xz -> reveng-2.0.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/CHANGES new/reveng-2.0.3/CHANGES
--- old/reveng-2.0.2/CHANGES    2019-11-02 16:55:52.000000000 +0100
+++ new/reveng-2.0.3/CHANGES    2019-11-18 18:45:26.000000000 +0100
@@ -19,19 +19,25 @@
 
 Revision history of CRC RevEng
 
+2.0.3  18 November 2019
+       * Added tomtorfs-wrapper.
+       * Revised poly class definitions and function entry conditions
+         in poly.c.
+       * Added DFSFIX veneer for ARM Tube OS binary.
+
 2.0.2  2 November 2019
        * The memory allocation expands geometrically while reading
          polynomials from files; this improves performance on large
          files but memory overhead is increased during the read.
        * The argument index is initialized at run time, allowing
-         RISC OS and ARM Tube OS users to re-invoke CRC RevEng from
+         RISC OS and ARM Tube OS users to reinvoke CRC RevEng from
          memory using *Go.
        * Replaced getopt library.
        * Removed underscores from system calls.
        * Updated documentation.
 
 2.0.1  9 May 2019
-       * Improved robustness of reveng()
+       * Improved robustness of reveng().
 
 2.0.0  6 May 2019
        * Much faster brute force search for generator polynomials if
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/RISCOSify new/reveng-2.0.3/RISCOSify
--- old/reveng-2.0.2/RISCOSify  2019-10-02 21:45:06.000000000 +0200
+++ new/reveng-2.0.3/RISCOSify  2019-11-18 18:51:15.000000000 +0100
@@ -1,5 +1,5 @@
 | RISCOSify
-| Greg Cook, 2/Oct/2019
+| Greg Cook, 18/Nov/2019
 
 | CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
 | Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018,
@@ -26,6 +26,9 @@
 | Mk/ARMTube or Mk/RISCOS.
 
 Set CRCRevEng$Dir <Obey$Dir>
+IfThere <CRCRevEng$Dir>.bin.armtubeos.dfsfix Then SetType 
<CRCRevEng$Dir>.bin.armtubeos.dfsfix &FFD
+IfThere <CRCRevEng$Dir>.bin.armtubeos.dfsfix/inf Then SetType 
<CRCRevEng$Dir>.bin.armtubeos.dfsfix/inf &FFF
+IfThere <CRCRevEng$Dir>.bin.armtubeos.dfsfix/txt Then SetType 
<CRCRevEng$Dir>.bin.armtubeos.dfsfix/txt &FFE
 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
@@ -43,7 +46,7 @@
 IfThere <CRCRevEng$Dir>.bin.riscos.Select_429.!Boot.Resources.!System.!Run 
Then SetType <CRCRevEng$Dir>.bin.riscos.Select_429.!Boot.Resources.!System.!Run 
&FEB
 IfThere <CRCRevEng$Dir>.bin.riscos.!System.310.Modules.CLib Then SetType 
<CRCRevEng$Dir>.bin.riscos.!System.310.Modules.CLib &FFA
 IfThere <CRCRevEng$Dir>.bin.riscos.!System.500.Modules.CLib Then SetType 
<CRCRevEng$Dir>.bin.riscos.!System.500.Modules.CLib &FFA
-IfThere <CRCRevEng$Dir>.bin.win32.reveng/exe Then SetType 
<CRCRevEng$Dir>.bin.win32.reveng/exe &FE4
+IfThere <CRCRevEng$Dir>.bin.win32.reveng/exe Then SetType 
<CRCRevEng$Dir>.bin.win32.reveng/exe &FD9
 IfThere <CRCRevEng$Dir>.bmpbit/c Then SetType <CRCRevEng$Dir>.bmpbit/c &FFF
 IfThere <CRCRevEng$Dir>.CHANGES Then SetType <CRCRevEng$Dir>.CHANGES &FFF
 IfThere <CRCRevEng$Dir>.cli/c Then SetType <CRCRevEng$Dir>.cli/c &FFF
@@ -65,6 +68,7 @@
 IfThere <CRCRevEng$Dir>.reveng/h Then SetType <CRCRevEng$Dir>.reveng/h &FFF
 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
 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.2/bin/armtubeos/README 
new/reveng-2.0.3/bin/armtubeos/README
--- old/reveng-2.0.2/bin/armtubeos/README       2019-11-01 19:59:18.000000000 
+0100
+++ new/reveng-2.0.3/bin/armtubeos/README       2019-11-18 18:41:48.000000000 
+0100
@@ -1,5 +1,5 @@
 System requirements of ARM Tube OS binary
-Greg Cook, 1 November 2019
+Greg Cook, 18 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
@@ -7,10 +7,8 @@
 The following filing systems are known to be compatible:-
 
 - 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) is
-verified for invocations that do not read files (command lines without
--f).
+- Acorn DFS 2.26, as supplied with the GoMMC interface (PDFS226.BIN),
+  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:
@@ -44,3 +42,25 @@
 
 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
+
+This is a small veneer 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.
+
+To install DFSFIX, enter the following (once) after pressing BREAK:
+
+       *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
+reassembly to another base address or selection of extended features.
+Assembly options are documented in the listing.
Binary files old/reveng-2.0.2/bin/armtubeos/dfsfix and 
new/reveng-2.0.3/bin/armtubeos/dfsfix differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/bin/armtubeos/dfsfix.inf 
new/reveng-2.0.3/bin/armtubeos/dfsfix.inf
--- old/reveng-2.0.2/bin/armtubeos/dfsfix.inf   1970-01-01 01:00:00.000000000 
+0100
+++ new/reveng-2.0.3/bin/armtubeos/dfsfix.inf   2019-11-18 18:16:23.000000000 
+0100
@@ -0,0 +1 @@
+$.DFSFIX FFFF1600 FFFF1600 00FE CRC=D806
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/bin/armtubeos/dfsfix.txt 
new/reveng-2.0.3/bin/armtubeos/dfsfix.txt
--- old/reveng-2.0.2/bin/armtubeos/dfsfix.txt   1970-01-01 01:00:00.000000000 
+0100
+++ new/reveng-2.0.3/bin/armtubeos/dfsfix.txt   2019-11-18 18:16:06.000000000 
+0100
@@ -0,0 +1,471 @@
+*| dfsfix.txt
+*| Greg Cook, 18 November 2019
+*|
+*| This is a small veneer 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.
+*| 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.)
+*|
+*| 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
+*|   results in undefined behaviour.
+*|   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)
+*|
+*| Assembly options:
+*| Address (&1400): &
+*|   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
+*|   remain available.
+*|   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)
+*|     &1500, in place of sector buffer &14..15 (DFS) / &15 (EDOS)
+*|     &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.
+*|   The address need not be page-aligned, but remember that 256 or 512
+*|   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).
+*|   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.
+*|
+*| OSARGS 3,Y to test MSB? (Y/N): Y adds 12 bytes
+*|   Treats the parameter to OSARGS as a 24-bit (N) or 32-bit (Y)
+*|   quantity.  In the latter case any request to extend a file beyond
+*|   16 MiB raises a "Can't extend" error.
+*|   With N a pointer prepared for a 24-bit implementation of
+*|   OSARGS 1,Y can also be passed to OSARGS 3,Y.  The Y option
+*|   enables strict compliance with the DFS and RISC OS APIs.
+*|
+*| OSARGS 3,Y to clamp PTR? (Y/N): Y adds 17 bytes
+*|   With N, calls to OSARGS 3,Y do not change a file's pointer while
+*|   changing its size, and so the pointer may sometimes be left far
+*|   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
+*|   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
+*|   pointing to the end-of-file or before.  Acorn DFS enforces this
+*|   condition at all times, so the proper choice is Y in this case.
+*|   Otherwise, refrain from performing a truncation that will leave the
+*|   pointer 'dangling'.
+*|   Fortunately, RISC OS programs that just write files sequentially
+*|   only zero a file's length initially, when the pointer is also zero.
+*|   Not clamping PTR is potentially useful, making file truncation a
+*|   means of discarding a portion of data before the pointer in a
+*|   single step.  But as mentioned, it may violate the filing system's
+*|   assumptions about the pointer, and should be tried with caution.
+*|
+*| 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
+*|   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
+*|   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
+*|   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.
+*|
+*| Save? (Y/N):
+*|   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.
+*|   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 Reportedly unused space in the Econet area
+REM http://mdfs.net/Docs/Comp/BBC/AllMem
+tempptr=&93
+REM OSARGS 3,Y and OSGBPB will not cause themselves or each other to be called
+ptr=&93
+os_vector_base=&200
+os_filev=&212
+os_argsv=&214
+os_gbpbv=&21A
+os_findv=&21C
+os_softkey_buffer=&B00
+osbput=&FFD4
+osfile=&FFDD
+
+base%=FNgethex("Address (&1400): &",&1400)
+PRINT"Installer first? ";:installer_first%=FNyesno
+PRINT"For old EDOS? ";:edos%=FNyesno
+PRINT"OSARGS 3,Y to test MSB? ";:args32%=FNyesno
+PRINT"OSARGS 3,Y to clamp PTR? ";:clampptr%=FNyesno
+PRINT"C if OSGBPB returns A>0:-"'"Preserve / Set / Set iff L>0 (P/S/L):";
+REPEAT input%=INSTR(" PpSsLl",GET$)DIV 2:UNTIL input%>0
+PRINT MID$("PSL",input%,1)
+IF input%=1 THEN preserve%=1:test_length%=0
+IF input%=2 THEN preserve%=0:test_length%=0
+IF input%=3 THEN preserve%=0:test_length%=1
+
+IF edos% THEN channel_ext=&1082 ELSE channel_ext=&1114
+IF edos% THEN channel_ptr=&1085 ELSE channel_ptr=&1110
+IF edos% THEN channel_eof_warning_flag=&1070 ELSE 
channel_eof_warning_flag=&1117
+IF edos% THEN channel_eof_warning_mask%=&FE ELSE channel_eof_warning_mask%=&EF
+
+pass1%=0:pass2%=3
+
+DIM osblock% 19, filename% 255
+FOR pass%=pass1% TO pass2% STEP pass2%-pass1%
+P%=base%
+REM IF base%=os_softkey_buffer THEN PROCasm_softkey_indices
+IF installer_first% THEN PROCasm_installer
+PROCasm_routines
+IF installer_first% ELSE PROCasm_installer
+NEXT
+
+PRINT '"Save? ";:IF FNyesno THEN PROCsave
+END
+
+DEF FNgethex(prompt$,default%)
+LOCAL input$,good%,iter%
+REPEAT
+REPEAT
+PRINT prompt$;
+INPUT "" input$
+UNTIL LEN(input$) <=8
+good%=TRUE
+FOR iter%=1 TO LEN(input$)
+good%=good% AND INSTR("0123456789ABCDEF",MID$(input$,iter%,1))>0
+NEXT
+UNTIL good%
+IF LEN(input$)=0 =default%
+=EVAL("&"+input$)
+
+DEF FNyesno
+LOCAL input%
+PRINT "(Y/N):";
+REPEAT
+input%=INSTR(" NnYy",GET$)DIV 2
+UNTIL input%>0
+IF input%=2 PRINT "yes" ELSE PRINT "no"
+=input%=2
+
+DEF PROCasm_softkey_indices
+routines_end=routines_end
+PROCequs(STRING$(17,CHR$(routines_end-base%-1)))
+ENDPROC
+
+DEF PROCequs(A$)
+$P%=A$
+P%=P%+LENA$
+ENDPROC
+
+DEF PROCequb(A%)
+?P%=A%
+P%=P%+1
+ENDPROC
+
+DEF PROCasm_installer
+[OPT pass%
+.install
+LDX #os_filev-os_vector_base
+LDY #filewrap_jmp+1-routines
+JSR install_hook
+\LDX #os_argsv-os_vector_base
+LDY #argswrap_jmp+1-routines
+JSR install_hook
+LDX #os_gbpbv-os_vector_base
+LDY #gbpbwrap_jsr+1-routines
+JSR install_hook
+\LDX #os_findv-os_vector_base
+LDY #findwrap_jsr+1-routines
+.install_hook
+JSR install_hook_byte
+.install_hook_byte
+LDA routines,Y
+PHA
+LDA os_vector_base,X
+STA routines,Y
+PLA
+STA os_vector_base,X
+INX
+INY
+RTS
+.install_end
+]
+ENDPROC
+
+DEF PROCasm_routines
+[OPT pass%
+.routines
+.routines_clear_eof_warning
+]
+IF edos% THEN PROCasm_edos ELSE PROCasm_dfs
+[OPT pass%
+LDA channel_eof_warning_flag,Y
+AND #channel_eof_warning_mask%
+STA channel_eof_warning_flag,Y
+RTS
+:
+.filewrap_5
+LDA #5
+.filewrap
+CMP #7
+BEQ filewrap_0
+CMP #9
+BEQ filewrap_5
+CMP #11
+BNE filewrap_jmp
+.filewrap_0
+LDA #0
+.filewrap_jmp
+JMP filewrap
+:
+.argswrap
+CPY #1
+BCC argswrap_jmp
+CMP #3
+BNE argswrap_jmp
+TXA
+PHA
+LDA #0
+.argswrap_temp_ptr
+LDX #tempptr
+JSR argswrap_jmp
+PLA
+TAX
+TYA
+PHA
+JSR routines_clear_eof_warning
+]
+IF args32% THEN PROCasm_args32_1
+[OPT pass%
+LDA channel_ext,Y \EXT - request
+CMP 0,X
+LDA channel_ext+1,Y
+SBC 1,X
+LDA channel_ext+2,Y
+SBC 2,X
+BCC argswrap_extend \if request > EXT then extend
+LDA 2,X
+STA channel_ext+2,Y
+LDA 1,X
+STA channel_ext+1,Y
+LDA 0,X
+STA channel_ext,Y
+]
+IF clampptr% THEN PROCasm_clampptr
+IF args32% THEN PROCasm_args32_2
+[OPT pass%
+.argswrap_extend \on entry C=0 to extend, C=1 to return EXT; request > 0
+PLA
+TAY
+LDA #2
+BCS argswrap_jmp
+LDA 0,X
+BNE argswrap_dec_1
+LDA 1,X
+BNE argswrap_dec_2
+DEC 2,X
+.argswrap_dec_2
+DEC 1,X
+.argswrap_dec_1
+DEC 0,X
+JSR argswrap_set_ptr
+LDA #0
+JSR osbput
+JSR argswrap_jmp
+TXA
+PHA
+LDA #1
+BNE argswrap_temp_ptr
+]
+IF clampptr% THEN [OPT pass%:.argswrap_ply_set_ptr:PLA:TAY:]
+[OPT pass%
+.argswrap_set_ptr
+LDA #1
+.argswrap_jmp
+JMP argswrap
+:
+.gbpbwrap
+STA ptr
+STY ptr+1
+.gbpbwrap_jsr
+JSR gbpbwrap
+TAY
+]
+IF preserve% THEN [OPT pass%:BNE gbpbwrap_quit:]
+IF test_length% THEN [OPT pass%:BNE gbpbwrap_test_length:]
+IF test_length% OR preserve% ELSE [OPT pass%:BNE gbpbwrap_sec_quit:]
+[OPT pass%
+PHP
+LDA #4
+CMP ptr
+BCC gbpbwrap_plp
+STX ptr
+LDA (ptr),Y
+JSR routines_clear_eof_warning
+LDA #0
+.gbpbwrap_plp
+PLP
+.gbpbwrap_quit
+LDY ptr+1
+.gbpbwrap_exit
+RTS
+]
+IF test_length% THEN PROCasm_gbpbwrap_test_length
+IF test_length% OR preserve% ELSE [OPT pass%:.gbpbwrap_sec_quit:SEC:BCS 
gbpbwrap_quit:]
+[OPT pass%
+:
+.findwrap
+PHA
+AND #&48
+CMP #&48
+PLA
+PHP
+AND #&C0
+.findwrap_jsr
+JSR findwrap
+PLP
+EOR #0
+BNE gbpbwrap_exit
+BCC gbpbwrap_exit
+BRK
+]
+PROCequb(&D6)
+PROCequs("Not found")
+PROCequb(&00)
+[OPT pass%
+.routines_end
+]
+ENDPROC
+
+DEF PROCasm_args32_1
+[OPT pass%
+\treat parameter as 32 bits
+LDA #0
+CMP 3,X
+BCC argswrap_extend_max
+]
+ENDPROC
+
+DEF PROCasm_clampptr
+[OPT pass%
+\clamp PTR
+\request - PTR
+CMP channel_ptr,Y
+LDA 1,X
+SBC channel_ptr+1,Y
+LDA 2,X
+SBC channel_ptr+2,Y
+BCC argswrap_ply_set_ptr
+]
+ENDPROC
+
+DEF PROCasm_args32_2
+[OPT pass%
+.argswrap_extend_max \on entry C=0 to extend, C=1 to return EXT
+STA 0,X
+\LDA #&FF
+STA 1,X
+STA 2,X
+]
+ENDPROC
+
+DEF PROCasm_edos
+[OPT pass%
+\return Y=A*0x18 for y=1..7
+AND #&07
+TAY
+\BEQ routines_edos_exit
+SEC
+.routines_edos_loop
+INY
+ADC #&85
+BNE routines_edos_loop
+\.routines_edos_exit
+]
+ENDPROC
+
+DEFPROCasm_dfs
+[OPT pass%
+ASL A
+ASL A
+ASL A
+ASL A
+ASL A
+TAY
+]
+ENDPROC
+
+DEF PROCasm_gbpbwrap_test_length
+[OPT pass%
+.gbpbwrap_test_length
+PHA
+STX ptr
+LDY #9
+.gbpbwrap_test_length_byte
+DEY
+CPY #5
+BCC gbpbwrap_test_length_quit
+LDA (ptr),Y
+BEQ gbpbwrap_test_length_byte
+.gbpbwrap_test_length_quit
+PLA
+BNE gbpbwrap_quit
+]
+ENDPROC
+
+DEF PROCsave
+LOCAL A%,X%,Y%
+X%=osblock%
+Y%=X% DIV 256
+$filename%="DFSFIX"
+!osblock%=filename%
+osblock%!2=&FFFF0000 OR base%
+osblock%!6=&FFFF0000 OR install
+osblock%!10=base%
+IF osblock%?2 THEN PRINT "Page aligned file? ";:IF FNyesno THEN 
osblock%?2=0:osblock%?10=0
+osblock%!14=P%
+A%=0
+CALL osfile
+ENDPROC
Binary files old/reveng-2.0.2/bin/armtubeos/reveng and 
new/reveng-2.0.3/bin/armtubeos/reveng differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/bin/armtubeos/reveng.inf 
new/reveng-2.0.3/bin/armtubeos/reveng.inf
--- old/reveng-2.0.2/bin/armtubeos/reveng.inf   2019-11-02 16:53:48.000000000 
+0100
+++ new/reveng-2.0.3/bin/armtubeos/reveng.inf   2019-11-18 20:56:36.000000000 
+0100
@@ -1 +1 @@
-$.reveng 8000 8000 10D6F CRC=8FA6
+$.reveng 8000 8000 10D6F CRC=5F47
Binary files old/reveng-2.0.2/bin/i386-linux/reveng and 
new/reveng-2.0.3/bin/i386-linux/reveng differ
Binary files old/reveng-2.0.2/bin/raspbian/reveng and 
new/reveng-2.0.3/bin/raspbian/reveng differ
Binary files old/reveng-2.0.2/bin/riscos/reveng and 
new/reveng-2.0.3/bin/riscos/reveng differ
Binary files old/reveng-2.0.2/bin/win32/reveng.exe and 
new/reveng-2.0.3/bin/win32/reveng.exe differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/cli.c new/reveng-2.0.3/cli.c
--- old/reveng-2.0.2/cli.c      2019-11-02 15:41:12.000000000 +0100
+++ new/reveng-2.0.3/cli.c      2019-11-11 17:15:01.000000000 +0100
@@ -1,5 +1,5 @@
 /* cli.c
- * Greg Cook, 2/Nov/2019
+ * Greg Cook, 11/Nov/2019
  */
 
 /* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
@@ -95,7 +95,8 @@
 
        /* reset getopt() with our extension in case user used *Go */
        optind = 0; opterr = 0;
-       c=getopt(1, nargv, string);
+       getopt(1, nargv, string); /* getopt() sees end of argument 0 */
+       getopt(1, nargv, string); /* getopt() sees end of arguments */
        optind = 1; opterr = 1;
 
        /* stdin must be binary */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/contrib/getopt.h 
new/reveng-2.0.3/contrib/getopt.h
--- old/reveng-2.0.2/contrib/getopt.h   2014-02-01 14:50:11.000000000 +0100
+++ new/reveng-2.0.3/contrib/getopt.h   2019-11-06 22:56:28.000000000 +0100
@@ -1,11 +1,11 @@
-/* Public domain getopt.h, Greg Cook, <debou...@yahoo.co.uk> */
-
-#ifndef   GETOPT_H
-#  define GETOPT_H
-extern int      opterr;                /* undocumented error-suppressor*/
-extern int      optind;                /* index into argv vector       */
-extern int      optopt;                /* char checked for validity    */
-extern char    *optarg;                /* arg associated with option   */
-
-extern int      getopt(int nargc, char **nargv, char *ostr);
-#endif /* GETOPT_H */
+/* Public domain getopt.h, Greg Cook, <debou...@yahoo.co.uk> */
+
+#ifndef   GETOPT_H
+#  define GETOPT_H
+extern int      opterr;                /* undocumented error-suppressor*/
+extern int      optind;                /* index into argv vector       */
+extern int      optopt;                /* char checked for validity    */
+extern char    *optarg;                /* arg associated with option   */
+
+extern int      getopt(int nargc, char **nargv, char *ostr);
+#endif /* GETOPT_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/poly.c new/reveng-2.0.3/poly.c
--- old/reveng-2.0.2/poly.c     2019-05-09 23:20:35.000000000 +0200
+++ new/reveng-2.0.3/poly.c     2019-11-07 20:59:55.000000000 +0100
@@ -1,5 +1,5 @@
 /* poly.c
- * Greg Cook, 9/May/2019
+ * Greg Cook, 7/Nov/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-29: added quotient argument to pcrc(), pmod()
+/* 2019-11-07: reviewed poly class defs and function entry conditions
+ * 2019-04-29: added quotient argument to pcrc(), pmod()
  * 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()
@@ -60,8 +61,9 @@
 
 /* Note: WELL-FORMED poly_t objects have a valid bitmap pointer pointing
  * to a malloc()-ed array of at least as many bits as stated in its
- * length field.  Any poly_t with a length of 0 is also a WELL-FORMED
- * poly_t (whatever value the bitmap pointer has.)
+ * length field.  If the length is 0 then the pointer may also be equal
+ * to NULL (that is, at any length, the pointer must be a valid argument
+ * to realloc() or free().)
  * All poly_t objects passed to and from functions must be WELL-FORMED
  * unless otherwise stated.
  *
@@ -73,7 +75,7 @@
  * bit, at position (length - 1), is one.
  *
  * NORMALISED poly_t objects are SEMI-NORMALISED objects in which the
- * first bit is one.
+ * first bit, at position 0 is one.
  *
  * pfree() should be called on every poly_t object (including
  * those returned by functions) after its last use.
@@ -418,7 +420,6 @@
         * The length field has absolute priority over the contents of the 
bitmap.
         * Canonicalisation differs from normalisation in that leading and 
trailing
         * zero terms are significant and preserved.
-        * poly may or may not be WELL-FORMED.
         */
        praloc(poly, poly->length);
 }
@@ -428,7 +429,6 @@
        /* Converts poly into a NORMALISED object by removing leading
         * and trailing zeroes, so that the polynomial starts and ends
         * with significant terms.
-        * poly may or may not be WELL-FORMED.
         */
        unsigned long first;
 
@@ -448,7 +448,6 @@
        /* Converts poly into a SEMI-NORMALISED object by removing
         * trailing zeroes, so that the polynomial ends with a
         * significant term.
-        * poly may or may not be WELL-FORMED.
         */
 
        /* call pcanon() here so plast() returns the correct result */
@@ -461,7 +460,6 @@
        /* Normalise poly, then chop off the highest significant term
         * (produces a SEMI-NORMALISED object).  poly becomes a suitable
         * divisor for pcrc().
-        * poly may or may not be WELL-FORMED.
         */
 
         /* call pcanon() here so pfirst() and plast() return correct
@@ -476,7 +474,6 @@
        /* Convert poly from Koopman notation to chopped form (produces
         * a SEMI-NORMALISED object).  poly becomes a suitable divisor
         * for pcrc().
-        * poly may or may not be WELL-FORMED.
         */
        unsigned long first;
 
@@ -531,8 +528,8 @@
        /* Compares polys for identical effect, i.e. as though the
         * shorter poly were padded with zeroes to the length of the
         * longer.
-        * a and b must still be CLEAN, therefore psncmp() is *not*
-        * identical to pcmp() on semi-normalised polys as psnorm()
+        * a and b must be CLEAN, therefore psncmp(a,b) is *not*
+        * identical to psnorm(a); psnorm(b); pcmp(a,b) as psnorm()
         * clears the slack space.
         */
        unsigned long length, iter, idx;
@@ -616,6 +613,12 @@
 
 poly_t
 psubs(const poly_t src, unsigned long head, unsigned long start, unsigned long 
end, unsigned long tail) {
+       /* Returns a freestanding copy of a substring of src.
+        * See pshift().
+        * src must be CLEAN in the case that the end is overrun.
+        * If src is CLEAN then the returned poly_t is CLEAN.
+        */
+
        poly_t dest = PZERO;
        pshift(&dest, src, head, start, end, tail);
        return(dest);
@@ -626,7 +629,6 @@
        /* Trims or extends poly to length at the left edge, prepending
         * zeroes if necessary.  Analogous to praloc() except the
         * rightmost terms of poly are preserved.
-        * On entry, poly may or may not be WELL-FORMED.
         * On exit, poly is CLEAN.
         */
 
@@ -640,10 +642,13 @@
 
 void
 pshift(poly_t *dest, const poly_t src, unsigned long head, unsigned long 
start, unsigned long end, unsigned long tail) {
-       /* copies bits start to end-1 of src to dest, plus the number of 
leading and trailing zeroes given by head and tail.
-        * end may exceed the length of src in which case more zeroes are 
appended.
-        * dest may point to src, in which case the poly is edited in place.
-        * src must be CLEAN.
+       /* copies bits start to end-1 of src to dest, plus the number of
+        * leading and trailing zeroes given by head and tail.
+        * end may exceed the length of src in which case more zeroes
+        * are appended.
+        * dest may point to src, in which case the poly is edited in
+        * place.
+        * src must be CLEAN in the case that the end is overrun.
         * On exit, dest is CLEAN.
         */
 
@@ -706,15 +711,17 @@
 
 void
 ppaste(poly_t *dest, const poly_t src, unsigned long skip, unsigned long seek, 
unsigned long end, unsigned long fulllength) {
-       /* pastes terms of src, starting from skip, to positions seek to end-1 
of dest
-        * then sets length of dest to fulllength (>= end)
+       /* pastes terms of src, starting from skip, to positions seek to
+        * end-1 of dest then sets length of dest to fulllength (>= end)
         * to paste n terms of src, give end = seek + n
         * to truncate dest at end of paste, set fulllength = end
         * to avoid truncating, set fulllength = plen(*dest)
-        * dest may point to src, in which case the poly is edited in place.
+        * dest may point to src, in which case the poly is edited in
+        * place.
         * src must be CLEAN in the case that the end is overrun.
-        * On exit, dest is CLEAN.
+        * Does not clean dest unless end <= fulllength < plen(*dest).
         */
+
        bmp_t mask;
        unsigned long seekidx, endidx, iter;
        int seekofs;
@@ -766,7 +773,8 @@
 pdiff(poly_t *dest, const poly_t src, unsigned long ofs) {
        /* Subtract src from dest (modulo 2) at offset ofs.
         * In modulo 2 arithmetic, subtraction is equivalent to addition
-        * We include an alias for those who wish to retain the distinction
+        * We include an alias for those who wish to retain the
+        * distinction
         * src and dest must be CLEAN.
         */
        psum(dest, src, ofs);
@@ -898,6 +906,8 @@
         * If calling repeatedly with a constant divisor, produce a chopped copy
         * with pchop() and call pcrc() directly for higher efficiency.
         * dividend and divisor must be CLEAN.
+        * If dividend and divisor are CLEAN then the returned poly_t is CLEAN.
+        * On exit, quotient is CLEAN unless it is NULL.
         */
 
        /* perhaps generate an error if divisor is zero */
@@ -919,7 +929,8 @@
         * before adding init and division.  Set P_MULXN for most CRC
         * calculations.
         * All inputs must be CLEAN.
-        * If all inputs are CLEAN, the returned poly_t will be CLEAN.
+        * If all inputs are CLEAN then the returned poly_t is CLEAN.
+        * On exit, quotient is CLEAN unless it is NULL.
         */
        unsigned long max = 0UL, iter, ofs, resiter;
        bmp_t probe, rem, dvsr, quot = BMP_C(0), *qptr, *rptr, *sptr;
@@ -1035,7 +1046,7 @@
        /* Replace poly with the 'next' polynomial of equal length.
         * Returns zero if the next polynomial is all zeroes, a nonzero
         * value otherwise.
-        * Does not clean poly.
+        * poly must be CLEAN.
         */
        bmp_t *bptr;
        if(!poly->length) return(0);
@@ -1053,7 +1064,6 @@
         * consisting of all zeroes.
         * It is safe to call with length = 0, in which case the object
         * is freed.
-        * poly may or may not be WELL-FORMED.
         * On exit, poly is CLEAN.
         */
        unsigned long size = SIZE(length);
@@ -1075,7 +1085,6 @@
 pfree(poly_t *poly) {
        /* Frees poly's bitmap storage and sets poly equal to the empty
         * polynomial (PZERO).
-        * poly may or may not be WELL-FORMED.
         * On exit, poly is CLEAN.
         */
 
@@ -1090,7 +1099,6 @@
 praloc(poly_t *poly, unsigned long length) {
        /* Trims or extends poly to length at the right edge, appending
         * zeroes if necessary.
-        * On entry, poly may or may not be WELL-FORMED.
         * On exit, poly is CLEAN.
         */
        unsigned long oldsize, size = SIZE(length);
@@ -1131,7 +1139,7 @@
 int
 pmpar(const poly_t poly, const poly_t mask) {
        /* Return even parity of poly masked with mask.
-        * Poly and mask must be CLEAN.
+        * poly and mask must be CLEAN.
         */
        bmp_t res = BMP_C(0);
        int i = BMP_SUB;
@@ -1152,7 +1160,7 @@
 pident(const poly_t a, const poly_t b) {
        /* Return nonzero if a and b have the same length
         * and point to the same bitmap.
-        * a and b need not be CLEAN.
+        * a and b may or may not be CLEAN.
         */
        return(a.length == b.length && a.bitmap == b.bitmap);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/reveng.h new/reveng-2.0.3/reveng.h
--- old/reveng-2.0.2/reveng.h   2019-11-01 13:05:30.000000000 +0100
+++ new/reveng-2.0.3/reveng.h   2019-11-18 20:18:51.000000000 +0100
@@ -1,5 +1,5 @@
 /* reveng.h
- * Greg Cook, 1/Nov/2019
+ * Greg Cook, 18/Nov/2019
  */
 
 /* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
@@ -93,7 +93,7 @@
 /* Global definitions */
 
 /* CRC RevEng version string */
-#define VERSION "2.0.2"
+#define VERSION "2.0.3"
 
 /* bmpbit.c */
 typedef BMP_T bmp_t;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/reveng.rc new/reveng-2.0.3/reveng.rc
--- old/reveng-2.0.2/reveng.rc  2019-05-15 14:51:31.000000000 +0200
+++ new/reveng-2.0.3/reveng.rc  2019-11-18 20:19:27.000000000 +0100
@@ -1,5 +1,5 @@
 /* reveng.rc
- * Greg Cook, 15/May/2019
+ * Greg Cook, 18/Nov/2019
  */
 
 /* CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
@@ -30,11 +30,11 @@
 
 #include <windows.h>
 
-#define VER_FILEVERSION                        2,0,2,0
-#define VER_FILEVERSION_STR            "2.0.2.0\0"
+#define VER_FILEVERSION                        2,0,3,0
+#define VER_FILEVERSION_STR            "2.0.3.0\0"
 
-#define VER_PRODUCTVERSION             2,0,2,0
-#define VER_PRODUCTVERSION_STR         "2.0.2\0"
+#define VER_PRODUCTVERSION             2,0,3,0
+#define VER_PRODUCTVERSION_STR         "2.0.3\0"
 
 #ifndef DEBUG
 #define VER_DEBUG                      0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/reveng-2.0.2/tomtorfs-wrapper 
new/reveng-2.0.3/tomtorfs-wrapper
--- old/reveng-2.0.2/tomtorfs-wrapper   1970-01-01 01:00:00.000000000 +0100
+++ new/reveng-2.0.3/tomtorfs-wrapper   2019-11-06 21:59:38.000000000 +0100
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+# tomtorfs-wrapper
+# Greg Cook, 6/Nov/2019
+
+# CRC RevEng: arbitrary-precision CRC calculator and algorithm finder
+# Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018,
+# 2019  Gregory Cook
+#
+# This file is part of CRC RevEng.
+#
+# CRC RevEng is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# CRC RevEng is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with CRC RevEng.  If not, see <https://www.gnu.org/licenses/>.
+
+# Replacement for the 'tomtorfs' CRC calculator, used in CRC examples
+# on the Computer Interfacing Forum and elsewhere.
+#
+# INSTALLATION:
+#      chmod a+x tomtorfs-wrapper
+#      sudo cp tomtorfs-wrapper /usr/local/bin
+#      sudo ln -s tomtorfs-wrapper /usr/local/bin/tomtorfs
+#
+# USAGE:
+#      tomtorfs                FILE WIDTH POLY REFL INIT XOROUT
+#      tomtorfs-wrapper        FILE WIDTH POLY REFL INIT XOROUT
+#
+# FILE is a filename; WIDTH is a decimal integer. All other arguments
+# are hexadecimal integers, optionally beginning with '0x'.
+#
+# Translates the tomtorfs command to the equivalent CRC RevEng command
+# and executes it, calculating a CRC on the contents of FILE.
+# If invoked as 'tomtorfs-wrapper', prints the equivalent reveng command
+# line to standard error before execution.
+# For information on the arguments and their meanings, study the
+# translated command lines with reference to the CRC RevEng user guide.
+#
+# REFERENCES:
+# Greg Cook, CRC RevEng user guide.
+#   <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
+#   <https://www.ioccc.org/years.html#1998_tomtorfs>
+
+REVENG="reveng"
+PROG=${0##*/}
+
+REFL="-b -B"
+[ "$4" -gt "0" ] && REFL="-l -L"
+
+[ "$PROG" = "tomtorfs" ] || \
+       echo "$REVENG" -A "$2" -w "$2" -p "$3" -i "$5" $REFL -x "$6" \
+               -c -X -f "$1" >&2
+"$REVENG" -A "$2" -w "$2" -p "$3" -i "$5" $REFL -x "$6" -c -X -f "$1"


Reply via email to