xfer51.patch Patch file for send-file command of Xfer (Win32 binary) Greg Cook, 16/Apr/2006 For Xfer 5.1 (http://www.g7jjf.com/) Usage: Either patch the binary manually from the listing, or enter the following Linux commands: cd xfer51 mv -f XFER.EXE XFER.EXE.old xd -c XFER.EXE.old > XFER.EXE.hex patch -Np1 < xfer51.patch xd -l XFER.EXE.hex > XFER.EXE (xd can be found at http://www.fourmilab.ch/xd/ ) Result: When performing command P (PC file CRC), opens the local file in binary mode. This allows the calculated CRC to be correct when running in Windows. Also eliminates the pause every 256 bytes in command S (Send files to BBC), leaving only the pause every 4096 bytes to allow the BBC to save the file to disc. cksum xfer51.orig/XFER.EXE xfer51/XFER.EXE 205336601 90112 xfer51.orig/XFER.EXE 3081791249 90112 xfer51/XFER.EXE md5sum -b xfer51.orig/XFER.EXE xfer51/XFER.EXE 4818fcfd25ab2d608807e9322c5618ba *xfer51.orig/XFER.EXE 854c5b4873f0feef7ee910897aa88665 *xfer51/XFER.EXE diff -Naur xfer51.orig/XFER.EXE.hex xfer51/XFER.EXE.hex --- xfer51.orig/XFER.EXE.hex Sun Apr 16 22:12:42 2006 +++ xfer51/XFER.EXE.hex Sun Apr 16 22:12:49 2006 @@ -1384,7 +1384,7 @@ 5670: 00 68 00 01 00 00 51 55 E8 83 BE FF FF 8B F0 83 | .h....QUè.¾ÿÿ.ð. 5680: C4 28 83 FE 03 0F 85 9C 01 00 00 8B 44 24 14 33 | Ä(.þ........D$.3 5690: FF 85 C0 8B D8 C7 44 24 1C 00 10 00 00 0F 8E EE | ÿ.À.ØÇD$.......î - 56A0: 00 00 00 81 FB 00 01 00 00 BE 00 01 00 00 7F 02 | ....û....¾...... + 56A0: 00 00 00 81 FB 00 10 00 00 BE 00 10 00 00 7F 02 | ....û....¾...... 56B0: 8B F3 8B 44 24 30 85 C0 75 36 8B 54 24 24 8D 84 | .ó.D$0.Àu6.T$$.. 56C0: 24 3C 02 00 00 52 56 6A 01 50 E8 53 21 00 00 83 | $<...RVj.PèS!... 56D0: C4 10 3B C6 74 1A 8D 4C 24 3C 51 68 A8 29 41 00 | Ä.;Æt..L$ MAXLINELEN ? MAXLINELEN : remaining ; + long wbytes = remaining > SENDBUFSIZE ? SENDBUFSIZE : remaining ; if ( !fileerr && (long)fread(buffer, sizeof(char), wbytes, fileh) != wbytes ) { [End of xfer51.patch]