2009-08-10 22:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbtpathy/telepath.prg
* contrib/hbtpathy/tpcommon.c
+ TP_CRC16() reimplemented in .prg after reading Przemek's e-mail.
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-08-10 22:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbtpathy/telepath.prg
|
||||
* contrib/hbtpathy/tpcommon.c
|
||||
+ TP_CRC16() reimplemented in .prg after reading Przemek's e-mail.
|
||||
|
||||
2009-08-10 22:31 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbtpathy/tpcommon.c
|
||||
+ __TP_CRC16() rewritten using core checksum function.
|
||||
|
||||
@@ -489,8 +489,9 @@ PROCEDURE tp_clrkbd()
|
||||
RETURN
|
||||
|
||||
FUNCTION tp_crc16( cString )
|
||||
LOCAL crc := hb_crcct( cString )
|
||||
|
||||
RETURN __tp_CRC16( cString )
|
||||
RETURN Int( crc / 256 ) + Int( ( crc % 256 ) * 256 ) /* swap lo and hi bytes */
|
||||
|
||||
FUNCTION tp_crc32( cString )
|
||||
|
||||
|
||||
@@ -51,15 +51,6 @@
|
||||
*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapifs.h"
|
||||
#include "hbchksum.h"
|
||||
|
||||
HB_FUNC( __TP_CRC16 )
|
||||
{
|
||||
long crc = ( long ) hb_crcct( 0, hb_parcx( 1 ), hb_parclen( 1 ), 0x11021 );
|
||||
|
||||
hb_retnl( ( crc >> 8 ) | ( ( crc << 8 ) & 0xFF00 ) ); /* swap hi and lo byte */
|
||||
}
|
||||
|
||||
HB_FUNC_EXTERN( HB_BITAND );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user