From 209b5d93d66ffd512ac58e05aadb578ddcf3a0d0 Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Mon, 25 Sep 2023 09:56:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 浼樺寲 --- funcext/tvclib/getmsgd_crc32.tsf | 20 ++++++++++++++------ funcext/tvclib/utslmemo.tsf | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/funcext/tvclib/getmsgd_crc32.tsf b/funcext/tvclib/getmsgd_crc32.tsf index f867ac3..0a7ffa8 100644 --- a/funcext/tvclib/getmsgd_crc32.tsf +++ b/funcext/tvclib/getmsgd_crc32.tsf @@ -5,8 +5,18 @@ Begin @param(s)(string) 字符串 %% @return(string) 8位长度的信息指纹%% **} - {$ifdef linux} - G_CRC32TABLE:=array( + fc := static get_f(); + return call(fc,s,0); +End; +function get_f(); //获得函数指针 +begin + r := findfunction("getmsgdigest"); + if r then return r; + return thisfunction(my_crc32); +end +function my_crc32(s,f);//自己实现的crc32 +begin + G_CRC32TABLE:= static array( 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, @@ -83,7 +93,5 @@ Begin result .^= ebx; end; result:=_not(result); - return inttohex(result,8); - {$endif} - return GetMsgDigest(s,0); -End; \ No newline at end of file + return inttohex(result,8); +end \ No newline at end of file diff --git a/funcext/tvclib/utslmemo.tsf b/funcext/tvclib/utslmemo.tsf index b231565..39dfbeb 100644 --- a/funcext/tvclib/utslmemo.tsf +++ b/funcext/tvclib/utslmemo.tsf @@ -4,7 +4,7 @@ unit UTslMemo; **} {$ifdef linux} -{$define linuxpop} +{$define linuxpop123} {$endif} interface uses utslvclauxiliary,utslvclmemstruct,utslvclgdi,utslvclstdctl;