Hi Maurilio,

Yes, the CRC16 is different indeed, but the CRC32 was the same, in
fact (reading the old comments) the CRC32 code was taken from a generic
unicode library, so it's nothing tpathy specific, before deletion
I've verified the code table and formula to be the same as in core.

I've now checked original Telepath(y) libs and it uses "std" CRC32
code with the same precalculated table. It's uses it for ZMODEM which
needs std CRC32.

Actually the correct name for CRC16 included in Telepath(y) lib should
be CRC16-CCITT (or CRC-CCITT, or CRC16 X.25), which is a variation of
CRC16 using different polynomial. It's used in XMODEM protocol.

There is an HB_CRC() function in core which is supposed to be
compatible with it, but I cannot get the same result.

---
? HB_CRC(   "hello world" ) // ->     44550
? HB_CRCCT( "hello world" ) // ->     15332
? HB_CRC16( "hello world" ) // ->      8760
? TP_CRC16( "hello world" ) // ->     58427
? "Clipper original", 58427
---

Brgds,
Viktor

On 2009.08.10., at 1:28, maurilio longo wrote:

Viktor,

I think that either tp_crc16() or tp_crc32() had to be reimplemented because the available RTL functions were not compatible with the original (DOS) telepathy ones; CRCs had not the same value.

Do you have the original library and can you test whether CRCs for the same string do match?

Best regards.

Maurilio.



Revision: 12006
         
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=12006&view=rev
Author:   vszakats
Date:     2009-08-09 14:37:15 +0000 (Sun, 09 Aug 2009)

Log Message:
-----------
2009-08-09 16:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
 * contrib/hbtpathy/Makefile
 - contrib/hbtpathy/tplinux.c
 + contrib/hbtpathy/tpunix.c
 * contrib/hbtpathy/tpcommon.c
 * contrib/hbtpathy/tpwin.c
 * contrib/hbtpathy/tpos2.c
 * contrib/hbtpathy/telepath.prg
 * contrib/hbtpathy/hbtpathy.hbc
   + Enabled for all *nix systems (was only linux and darwin).
     I don't know if it works on all *nix systems, but it should
     be our goal. We will see. Please test.
   % Using HB_CRC32() in core instead of reimplementing it locally.
   ! P_CTRLCTS() dummy now returns proper type.
   + P_OUTFREE() implemented for Windows platforms.
   + P_ISDCD(), P_ISRI(), P_ISDSR(), P_ISCTS()
     implemented for Windows platforms. (ideas taken from hbwin)
     Neither of these were tested, but it's a start.
   + P_INFREE() added for Windows and OS/2.
     Only clean compilation was tested.
   + TP_INFREE() added.
   * Some formatting.

 * contrib/hbwin/win_prt.c
   + Some extra safety.

Modified Paths:
--------------
   trunk/harbour/ChangeLog
   trunk/harbour/contrib/hbtpathy/Makefile
   trunk/harbour/contrib/hbtpathy/hbtpathy.hbc
   trunk/harbour/contrib/hbtpathy/telepath.prg
   trunk/harbour/contrib/hbtpathy/tpcommon.c
   trunk/harbour/contrib/hbtpathy/tpos2.c
   trunk/harbour/contrib/hbtpathy/tpwin.c
   trunk/harbour/contrib/hbwin/win_prt.c

Added Paths:
-----------
   trunk/harbour/contrib/hbtpathy/tpunix.c

Removed Paths:
-------------
   trunk/harbour/contrib/hbtpathy/tplinux.c


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour


_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to