Large set of D2009 compatibility fixes. (mostly cosmetics only, like suppress unwanted warnings, etc.)
git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@123 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
parent
5e3d01a8f5
commit
15e4ca989a
@ -62,6 +62,11 @@ For sample of using, look to @link(TSnmpSend) or @link(TLdapSend)class.
|
|||||||
{$MODE DELPHI}
|
{$MODE DELPHI}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit asn1util;
|
unit asn1util;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
26
blcksock.pas
26
blcksock.pas
@ -89,6 +89,11 @@ Core with implementation basic socket classes.
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit blcksock;
|
unit blcksock;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -2078,6 +2083,7 @@ var
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
b := true;
|
b := true;
|
||||||
|
l := 0;
|
||||||
if WithSize then
|
if WithSize then
|
||||||
begin
|
begin
|
||||||
l := Stream.Size - Stream.Position;;
|
l := Stream.Size - Stream.Position;;
|
||||||
@ -3209,7 +3215,7 @@ end;
|
|||||||
|
|
||||||
function TSocksBlockSocket.SocksOpen: boolean;
|
function TSocksBlockSocket.SocksOpen: boolean;
|
||||||
var
|
var
|
||||||
Buf: string;
|
Buf: AnsiString;
|
||||||
n: integer;
|
n: integer;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
@ -3239,8 +3245,8 @@ begin
|
|||||||
;
|
;
|
||||||
2:
|
2:
|
||||||
begin
|
begin
|
||||||
Buf := #1 + char(Length(FSocksUsername)) + FSocksUsername
|
Buf := #1 + AnsiChar(Length(FSocksUsername)) + FSocksUsername
|
||||||
+ char(Length(FSocksPassword)) + FSocksPassword;
|
+ AnsiChar(Length(FSocksPassword)) + FSocksPassword;
|
||||||
SendString(Buf);
|
SendString(Buf);
|
||||||
Buf := RecvBufferStr(2, FSocksTimeout);
|
Buf := RecvBufferStr(2, FSocksTimeout);
|
||||||
if Length(Buf) < 2 then
|
if Length(Buf) < 2 then
|
||||||
@ -3263,14 +3269,14 @@ end;
|
|||||||
function TSocksBlockSocket.SocksRequest(Cmd: Byte;
|
function TSocksBlockSocket.SocksRequest(Cmd: Byte;
|
||||||
const IP, Port: string): Boolean;
|
const IP, Port: string): Boolean;
|
||||||
var
|
var
|
||||||
Buf: string;
|
Buf: AnsiString;
|
||||||
begin
|
begin
|
||||||
FBypassFlag := True;
|
FBypassFlag := True;
|
||||||
try
|
try
|
||||||
if FSocksType <> ST_Socks5 then
|
if FSocksType <> ST_Socks5 then
|
||||||
Buf := #4 + char(Cmd) + SocksCode(IP, Port)
|
Buf := #4 + AnsiChar(Cmd) + SocksCode(IP, Port)
|
||||||
else
|
else
|
||||||
Buf := #5 + char(Cmd) + #0 + SocksCode(IP, Port);
|
Buf := #5 + AnsiChar(Cmd) + #0 + SocksCode(IP, Port);
|
||||||
SendString(Buf);
|
SendString(Buf);
|
||||||
Result := FLastError = 0;
|
Result := FLastError = 0;
|
||||||
finally
|
finally
|
||||||
@ -3280,7 +3286,7 @@ end;
|
|||||||
|
|
||||||
function TSocksBlockSocket.SocksResponse: Boolean;
|
function TSocksBlockSocket.SocksResponse: Boolean;
|
||||||
var
|
var
|
||||||
Buf, s: string;
|
Buf, s: AnsiString;
|
||||||
x: integer;
|
x: integer;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
@ -3313,7 +3319,7 @@ begin
|
|||||||
x := RecvByte(FSocksTimeout);
|
x := RecvByte(FSocksTimeout);
|
||||||
if FLastError <> 0 then
|
if FLastError <> 0 then
|
||||||
Exit;
|
Exit;
|
||||||
s := char(x) + RecvBufferStr(x, FSocksTimeout);
|
s := AnsiChar(x) + RecvBufferStr(x, FSocksTimeout);
|
||||||
end;
|
end;
|
||||||
4:
|
4:
|
||||||
s := RecvBufferStr(16, FSocksTimeout);
|
s := RecvBufferStr(16, FSocksTimeout);
|
||||||
@ -3368,10 +3374,10 @@ begin
|
|||||||
ip6 := StrToIP6(IP);
|
ip6 := StrToIP6(IP);
|
||||||
Result := #4;
|
Result := #4;
|
||||||
for n := 0 to 15 do
|
for n := 0 to 15 do
|
||||||
Result := Result + char(ip6[n]);
|
Result := Result + AnsiChar(ip6[n]);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result := #3 + char(Length(IP)) + IP;
|
Result := #3 + AnsiChar(Length(IP)) + IP;
|
||||||
Result := Result + CodeInt(ResolvePort(Port));
|
Result := Result + CodeInt(ResolvePort(Port));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -54,6 +54,11 @@ daemon from ClamAV. See more about ClamAV on @LINK(http://www.clamav.net)
|
|||||||
{$Q-}
|
{$Q-}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit clamsend;
|
unit clamsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -249,7 +254,6 @@ end;
|
|||||||
function TClamSend.ScanStream2(const Value: TStream): AnsiString;
|
function TClamSend.ScanStream2(const Value: TStream): AnsiString;
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
s: AnsiString;
|
|
||||||
begin
|
begin
|
||||||
Result := '';
|
Result := '';
|
||||||
if not FSession then
|
if not FSession then
|
||||||
|
11
dnssend.pas
11
dnssend.pas
@ -1,5 +1,5 @@
|
|||||||
{==============================================================================|
|
{==============================================================================|
|
||||||
| Project : Ararat Synapse | 002.007.005 |
|
| Project : Ararat Synapse | 002.007.006 |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: DNS client |
|
| Content: DNS client |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
@ -54,6 +54,11 @@ Used RFC: RFC-1035, RFC-1183, RFC1706, RFC1712, RFC2163, RFC2230
|
|||||||
{$Q-}
|
{$Q-}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit dnssend;
|
unit dnssend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -248,13 +253,13 @@ begin
|
|||||||
for n := 1 to Length(Value) do
|
for n := 1 to Length(Value) do
|
||||||
if Value[n] = '.' then
|
if Value[n] = '.' then
|
||||||
begin
|
begin
|
||||||
Result := Result + Char(Length(s)) + s;
|
Result := Result + AnsiChar(Length(s)) + s;
|
||||||
s := '';
|
s := '';
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
s := s + Value[n];
|
s := s + Value[n];
|
||||||
if s <> '' then
|
if s <> '' then
|
||||||
Result := Result + Char(Length(s)) + s;
|
Result := Result + AnsiChar(Length(s)) + s;
|
||||||
Result := Result + #0;
|
Result := Result + #0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
30
ftpsend.pas
30
ftpsend.pas
@ -1,5 +1,5 @@
|
|||||||
{==============================================================================|
|
{==============================================================================|
|
||||||
| Project : Ararat Synapse | 003.005.002 |
|
| Project : Ararat Synapse | 003.005.003 |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: FTP client |
|
| Content: FTP client |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
@ -53,6 +53,11 @@ Used RFC: RFC-959, RFC-2228, RFC-2428
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit ftpsend;
|
unit ftpsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -84,18 +89,17 @@ type
|
|||||||
listing of FTP server.}
|
listing of FTP server.}
|
||||||
TFTPListRec = class(TObject)
|
TFTPListRec = class(TObject)
|
||||||
private
|
private
|
||||||
FFileName: string;
|
FFileName: String;
|
||||||
FDirectory: Boolean;
|
FDirectory: Boolean;
|
||||||
FReadable: Boolean;
|
FReadable: Boolean;
|
||||||
FFileSize: Longint;
|
FFileSize: Longint;
|
||||||
FFileTime: TDateTime;
|
FFileTime: TDateTime;
|
||||||
FOriginalLine: string;
|
FOriginalLine: string;
|
||||||
FMask: string;
|
FMask: string;
|
||||||
FPermission: string;
|
FPermission: String;
|
||||||
public
|
public
|
||||||
{: You can assign another TFTPListRec to this object.}
|
{: You can assign another TFTPListRec to this object.}
|
||||||
procedure Assign(Value: TFTPListRec); virtual;
|
procedure Assign(Value: TFTPListRec); virtual;
|
||||||
published
|
|
||||||
{:name of file}
|
{:name of file}
|
||||||
property FileName: string read FFileName write FFileName;
|
property FileName: string read FFileName write FFileName;
|
||||||
{:if name is subdirectory not file.}
|
{:if name is subdirectory not file.}
|
||||||
@ -135,16 +139,16 @@ type
|
|||||||
YearTime: string;
|
YearTime: string;
|
||||||
Year: string;
|
Year: string;
|
||||||
Hours: string;
|
Hours: string;
|
||||||
HoursModif: string;
|
HoursModif: Ansistring;
|
||||||
Minutes: string;
|
Minutes: string;
|
||||||
Seconds: string;
|
Seconds: string;
|
||||||
Size: string;
|
Size: Ansistring;
|
||||||
Permissions: string;
|
Permissions: Ansistring;
|
||||||
DirFlag: string;
|
DirFlag: string;
|
||||||
function GetListItem(Index: integer): TFTPListRec; virtual;
|
function GetListItem(Index: integer): TFTPListRec; virtual;
|
||||||
function ParseEPLF(Value: string): Boolean; virtual;
|
function ParseEPLF(Value: string): Boolean; virtual;
|
||||||
procedure ClearStore; virtual;
|
procedure ClearStore; virtual;
|
||||||
function ParseByMask(Value, NextValue, Mask: string): Integer; virtual;
|
function ParseByMask(Value, NextValue, Mask: ansistring): Integer; virtual;
|
||||||
function CheckValues: Boolean; virtual;
|
function CheckValues: Boolean; virtual;
|
||||||
procedure FillRecord(const Value: TFTPListRec); virtual;
|
procedure FillRecord(const Value: TFTPListRec); virtual;
|
||||||
public
|
public
|
||||||
@ -510,7 +514,7 @@ end;
|
|||||||
|
|
||||||
function TFTPSend.ReadResult: Integer;
|
function TFTPSend.ReadResult: Integer;
|
||||||
var
|
var
|
||||||
s, c: string;
|
s, c: AnsiString;
|
||||||
begin
|
begin
|
||||||
FFullResult.Clear;
|
FFullResult.Clear;
|
||||||
c := '';
|
c := '';
|
||||||
@ -820,7 +824,7 @@ end;
|
|||||||
procedure TFTPSend.ParseRemoteEPSV(Value: string);
|
procedure TFTPSend.ParseRemoteEPSV(Value: string);
|
||||||
var
|
var
|
||||||
n: integer;
|
n: integer;
|
||||||
s, v: string;
|
s, v: AnsiString;
|
||||||
begin
|
begin
|
||||||
s := SeparateRight(Value, '(');
|
s := SeparateRight(Value, '(');
|
||||||
s := Trim(SeparateLeft(s, ')'));
|
s := Trim(SeparateLeft(s, ')'));
|
||||||
@ -1338,11 +1342,11 @@ begin
|
|||||||
DirFlag := '';
|
DirFlag := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFTPList.ParseByMask(Value, NextValue, Mask: string): Integer;
|
function TFTPList.ParseByMask(Value, NextValue, Mask: AnsiString): Integer;
|
||||||
var
|
var
|
||||||
Ivalue, IMask: integer;
|
Ivalue, IMask: integer;
|
||||||
MaskC, LastMaskC: Char;
|
MaskC, LastMaskC: AnsiChar;
|
||||||
c: char;
|
c: AnsiChar;
|
||||||
s: string;
|
s: string;
|
||||||
begin
|
begin
|
||||||
ClearStore;
|
ClearStore;
|
||||||
|
@ -53,6 +53,11 @@ Used RFC: RFC-1350
|
|||||||
{$Q-}
|
{$Q-}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit ftptsend;
|
unit ftptsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -58,6 +58,11 @@ Used RFC: RFC-1867, RFC-1947, RFC-2388, RFC-2616
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit httpsend;
|
unit httpsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -52,6 +52,11 @@ Used RFC: RFC-2060, RFC-2595
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit imapsend;
|
unit imapsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -52,6 +52,11 @@ Used RFC: RFC-2251, RFC-2254, RFC-2829, RFC-2830
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit ldapsend;
|
unit ldapsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -53,6 +53,11 @@ Used RFC: RFC-2047, RFC-2231
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit mimeinln;
|
unit mimeinln;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -55,6 +55,11 @@ Used RFC: RFC-2045
|
|||||||
{$Q-}
|
{$Q-}
|
||||||
{$R-}
|
{$R-}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit mimepart;
|
unit mimepart;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -53,6 +53,12 @@ Used RFC: RFC-977, RFC-2980
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$WARN SUSPICIOUS_TYPECAST OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit nntpsend;
|
unit nntpsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
25
pingsend.pas
25
pingsend.pas
@ -73,6 +73,11 @@ Note: This unit is NOT portable to .NET!
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit pingsend;
|
unit pingsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -113,7 +118,7 @@ type
|
|||||||
TPINGSend = class(TSynaClient)
|
TPINGSend = class(TSynaClient)
|
||||||
private
|
private
|
||||||
FSock: TICMPBlockSocket;
|
FSock: TICMPBlockSocket;
|
||||||
FBuffer: string;
|
FBuffer: Ansistring;
|
||||||
FSeq: Integer;
|
FSeq: Integer;
|
||||||
FId: Integer;
|
FId: Integer;
|
||||||
FPacketSize: Integer;
|
FPacketSize: Integer;
|
||||||
@ -128,8 +133,8 @@ type
|
|||||||
FReplyErrorDesc: string;
|
FReplyErrorDesc: string;
|
||||||
FTTL: Byte;
|
FTTL: Byte;
|
||||||
Fsin: TVarSin;
|
Fsin: TVarSin;
|
||||||
function Checksum(Value: string): Word;
|
function Checksum(Value: AnsiString): Word;
|
||||||
function Checksum6(Value: string): Word;
|
function Checksum6(Value: AnsiString): Word;
|
||||||
function ReadPacket: Boolean;
|
function ReadPacket: Boolean;
|
||||||
procedure TranslateError;
|
procedure TranslateError;
|
||||||
procedure TranslateErrorIpHlp(value: integer);
|
procedure TranslateErrorIpHlp(value: integer);
|
||||||
@ -220,7 +225,7 @@ type
|
|||||||
TOS: Byte;
|
TOS: Byte;
|
||||||
Flags: Byte;
|
Flags: Byte;
|
||||||
OptionsSize: Byte;
|
OptionsSize: Byte;
|
||||||
OptionsData: PChar;
|
OptionsData: PAnsiChar;
|
||||||
end;
|
end;
|
||||||
PIP_OPTION_INFORMATION = ^TIP_OPTION_INFORMATION;
|
PIP_OPTION_INFORMATION = ^TIP_OPTION_INFORMATION;
|
||||||
|
|
||||||
@ -443,7 +448,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPINGSend.Checksum(Value: string): Word;
|
function TPINGSend.Checksum(Value: AnsiString): Word;
|
||||||
var
|
var
|
||||||
CkSum: integer;
|
CkSum: integer;
|
||||||
Num, Remain: Integer;
|
Num, Remain: Integer;
|
||||||
@ -465,7 +470,7 @@ begin
|
|||||||
Result := Word(not CkSum);
|
Result := Word(not CkSum);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPINGSend.Checksum6(Value: string): Word;
|
function TPINGSend.Checksum6(Value: AnsiString): Word;
|
||||||
const
|
const
|
||||||
IOC_OUT = $40000000;
|
IOC_OUT = $40000000;
|
||||||
IOC_IN = $80000000;
|
IOC_IN = $80000000;
|
||||||
@ -474,7 +479,7 @@ const
|
|||||||
SIO_ROUTING_INTERFACE_QUERY = 20 or IOC_WS2 or IOC_INOUT;
|
SIO_ROUTING_INTERFACE_QUERY = 20 or IOC_WS2 or IOC_INOUT;
|
||||||
var
|
var
|
||||||
ICMP6Ptr: ^TICMP6Packet;
|
ICMP6Ptr: ^TICMP6Packet;
|
||||||
s: string;
|
s: AnsiString;
|
||||||
b: integer;
|
b: integer;
|
||||||
ip6: TSockAddrIn6;
|
ip6: TSockAddrIn6;
|
||||||
x: integer;
|
x: integer;
|
||||||
@ -578,7 +583,7 @@ var
|
|||||||
PingHandle: integer;
|
PingHandle: integer;
|
||||||
r: integer;
|
r: integer;
|
||||||
ipo: TIP_OPTION_INFORMATION;
|
ipo: TIP_OPTION_INFORMATION;
|
||||||
RBuff: string;
|
RBuff: Ansistring;
|
||||||
ip4reply: PICMP_ECHO_REPLY;
|
ip4reply: PICMP_ECHO_REPLY;
|
||||||
ip6reply: PICMPV6_ECHO_REPLY;
|
ip6reply: PICMPV6_ECHO_REPLY;
|
||||||
ip6: TSockAddrIn6;
|
ip6: TSockAddrIn6;
|
||||||
@ -602,7 +607,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
FillChar(ip6, sizeof(ip6), 0);
|
FillChar(ip6, sizeof(ip6), 0);
|
||||||
r := Icmp6SendEcho2(PingHandle, nil, nil, nil, @ip6, @Fsin,
|
r := Icmp6SendEcho2(PingHandle, nil, nil, nil, @ip6, @Fsin,
|
||||||
Pchar(FBuffer), length(FBuffer), @ipo, pchar(RBuff), length(RBuff), FTimeout);
|
PAnsichar(FBuffer), length(FBuffer), @ipo, pAnsichar(RBuff), length(RBuff), FTimeout);
|
||||||
if r > 0 then
|
if r > 0 then
|
||||||
begin
|
begin
|
||||||
RBuff := #0 + #0 + RBuff;
|
RBuff := #0 + #0 + RBuff;
|
||||||
@ -617,7 +622,7 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
r := IcmpSendEcho2(PingHandle, nil, nil, nil, Fsin.sin_addr,
|
r := IcmpSendEcho2(PingHandle, nil, nil, nil, Fsin.sin_addr,
|
||||||
Pchar(FBuffer), length(FBuffer), @ipo, pchar(RBuff), length(RBuff), FTimeout);
|
PAnsichar(FBuffer), length(FBuffer), @ipo, pAnsichar(RBuff), length(RBuff), FTimeout);
|
||||||
if r > 0 then
|
if r > 0 then
|
||||||
begin
|
begin
|
||||||
ip4reply := PICMP_ECHO_REPLY(pointer(RBuff));
|
ip4reply := PICMP_ECHO_REPLY(pointer(RBuff));
|
||||||
|
10
pop3send.pas
10
pop3send.pas
@ -1,5 +1,5 @@
|
|||||||
{==============================================================================|
|
{==============================================================================|
|
||||||
| Project : Ararat Synapse | 002.006.001 |
|
| Project : Ararat Synapse | 002.006.002 |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: POP3 client |
|
| Content: POP3 client |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
@ -51,6 +51,12 @@ Used RFC: RFC-1734, RFC-1939, RFC-2195, RFC-2449, RFC-2595
|
|||||||
{$MODE DELPHI}
|
{$MODE DELPHI}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
{$M+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit pop3send;
|
unit pop3send;
|
||||||
|
|
||||||
@ -225,7 +231,7 @@ end;
|
|||||||
|
|
||||||
function TPOP3Send.ReadResult(Full: Boolean): Integer;
|
function TPOP3Send.ReadResult(Full: Boolean): Integer;
|
||||||
var
|
var
|
||||||
s: string;
|
s: AnsiString;
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
FFullResult.Clear;
|
FFullResult.Clear;
|
||||||
|
@ -53,6 +53,11 @@ Used RFC: RFC-1869, RFC-1870, RFC-1893, RFC-2034, RFC-2104, RFC-2195, RFC-2487,
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit smtpsend;
|
unit smtpsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -316,7 +321,7 @@ end;
|
|||||||
|
|
||||||
function TSMTPSend.ReadResult: Integer;
|
function TSMTPSend.ReadResult: Integer;
|
||||||
var
|
var
|
||||||
s: string;
|
s: String;
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
FFullResult.Clear;
|
FFullResult.Clear;
|
||||||
|
@ -56,6 +56,11 @@ Used RFC: RFC-1157, RFC-1901, RFC-3412, RFC-3414, RFC-3416
|
|||||||
{$Q-}
|
{$Q-}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit snmpsend;
|
unit snmpsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -101,7 +101,7 @@ type
|
|||||||
FMaxSyncDiff: double;
|
FMaxSyncDiff: double;
|
||||||
FSyncTime: Boolean;
|
FSyncTime: Boolean;
|
||||||
FSock: TUDPBlockSocket;
|
FSock: TUDPBlockSocket;
|
||||||
FBuffer: string;
|
FBuffer: AnsiString;
|
||||||
FLi, FVn, Fmode : byte;
|
FLi, FVn, Fmode : byte;
|
||||||
function StrToNTP(const Value: AnsiString): TNtp;
|
function StrToNTP(const Value: AnsiString): TNtp;
|
||||||
function NTPtoStr(const Value: Tntp): AnsiString;
|
function NTPtoStr(const Value: Tntp): AnsiString;
|
||||||
|
@ -80,6 +80,11 @@ accepting of new connections!
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit ssl_openssl;
|
unit ssl_openssl;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -60,6 +60,11 @@ Internal routines knows all major charsets for Europe or America. For East-Asian
|
|||||||
{$Q-}
|
{$Q-}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit synachar;
|
unit synachar;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
14
synacode.pas
14
synacode.pas
@ -1,9 +1,9 @@
|
|||||||
{==============================================================================|
|
{==============================================================================|
|
||||||
| Project : Ararat Synapse | 002.002.000 |
|
| Project : Ararat Synapse | 002.002.001 |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: Coding and decoding support |
|
| Content: Coding and decoding support |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Copyright (c)1999-2007, Lukas Gebauer |
|
| Copyright (c)1999-2010, Lukas Gebauer |
|
||||||
| All rights reserved. |
|
| All rights reserved. |
|
||||||
| |
|
| |
|
||||||
| Redistribution and use in source and binary forms, with or without |
|
| Redistribution and use in source and binary forms, with or without |
|
||||||
@ -33,7 +33,7 @@
|
|||||||
| DAMAGE. |
|
| DAMAGE. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
||||||
| Portions created by Lukas Gebauer are Copyright (c)2000-2007. |
|
| Portions created by Lukas Gebauer are Copyright (c)2000-2010. |
|
||||||
| All Rights Reserved. |
|
| All Rights Reserved. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Contributor(s): |
|
| Contributor(s): |
|
||||||
@ -50,6 +50,12 @@
|
|||||||
{$R-}
|
{$R-}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$WARN SUSPICIOUS_TYPECAST OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit synacode;
|
unit synacode;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -66,7 +72,7 @@ const
|
|||||||
['=', '(', ')', '[', ']', '<', '>', ':', ';', ',', '@', '/', '?', '\',
|
['=', '(', ')', '[', ']', '<', '>', ':', ';', ',', '@', '/', '?', '\',
|
||||||
'"', '_'];
|
'"', '_'];
|
||||||
NonAsciiChar: TSpecials =
|
NonAsciiChar: TSpecials =
|
||||||
[Char(0)..Char(31), Char(127)..Char(255)];
|
[#0..#31, #127..#255];
|
||||||
URLFullSpecialChar: TSpecials =
|
URLFullSpecialChar: TSpecials =
|
||||||
[';', '/', '?', ':', '@', '=', '&', '#', '+'];
|
[';', '/', '?', ':', '@', '=', '&', '#', '+'];
|
||||||
URLSpecialChar: TSpecials =
|
URLSpecialChar: TSpecials =
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{==============================================================================|
|
{==============================================================================|
|
||||||
| Project : Ararat Synapse | 001.000.000 |
|
| Project : Ararat Synapse | 001.000.001 |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: Encryption support |
|
| Content: Encryption support |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Copyright (c)2007, Lukas Gebauer |
|
| Copyright (c)2007-2010, Lukas Gebauer |
|
||||||
| All rights reserved. |
|
| All rights reserved. |
|
||||||
| |
|
| |
|
||||||
| Redistribution and use in source and binary forms, with or without |
|
| Redistribution and use in source and binary forms, with or without |
|
||||||
@ -33,7 +33,7 @@
|
|||||||
| DAMAGE. |
|
| DAMAGE. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
||||||
| Portions created by Lukas Gebauer are Copyright (c)2007. |
|
| Portions created by Lukas Gebauer are Copyright (c)2007-2010. |
|
||||||
| All Rights Reserved. |
|
| All Rights Reserved. |
|
||||||
| Based on work of David Barton and Eric Young |
|
| Based on work of David Barton and Eric Young |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
@ -56,6 +56,11 @@ Implemented are DES and 3DES encryption/decryption by ECB, CBC, CFB-8bit,
|
|||||||
{$R-}
|
{$R-}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit synacrypt;
|
unit synacrypt;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
10
synadbg.pas
10
synadbg.pas
@ -1,9 +1,9 @@
|
|||||||
{==============================================================================|
|
{==============================================================================|
|
||||||
| Project : Ararat Synapse | 001.001.000 |
|
| Project : Ararat Synapse | 001.001.001 |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: Socket debug tools |
|
| Content: Socket debug tools |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Copyright (c)2008, Lukas Gebauer |
|
| Copyright (c)2008-2010, Lukas Gebauer |
|
||||||
| All rights reserved. |
|
| All rights reserved. |
|
||||||
| |
|
| |
|
||||||
| Redistribution and use in source and binary forms, with or without |
|
| Redistribution and use in source and binary forms, with or without |
|
||||||
@ -33,7 +33,7 @@
|
|||||||
| DAMAGE. |
|
| DAMAGE. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
||||||
| Portions created by Lukas Gebauer are Copyright (c)2008. |
|
| Portions created by Lukas Gebauer are Copyright (c)2008-2010. |
|
||||||
| All Rights Reserved. |
|
| All Rights Reserved. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Contributor(s): |
|
| Contributor(s): |
|
||||||
@ -47,6 +47,10 @@
|
|||||||
Routines for help with debugging of events on the Sockets.
|
Routines for help with debugging of events on the Sockets.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit synadbg;
|
unit synadbg;
|
||||||
|
|
||||||
|
16
synaip.pas
16
synaip.pas
@ -1,9 +1,9 @@
|
|||||||
{==============================================================================|
|
{==============================================================================|
|
||||||
| Project : Ararat Synapse | 001.002.000 |
|
| Project : Ararat Synapse | 001.002.001 |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: IP address support procedures and functions |
|
| Content: IP address support procedures and functions |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Copyright (c)2006-2009, Lukas Gebauer |
|
| Copyright (c)2006-2010, Lukas Gebauer |
|
||||||
| All rights reserved. |
|
| All rights reserved. |
|
||||||
| |
|
| |
|
||||||
| Redistribution and use in source and binary forms, with or without |
|
| Redistribution and use in source and binary forms, with or without |
|
||||||
@ -33,7 +33,7 @@
|
|||||||
| DAMAGE. |
|
| DAMAGE. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
||||||
| Portions created by Lukas Gebauer are Copyright (c) 2006-2008. |
|
| Portions created by Lukas Gebauer are Copyright (c) 2006-2010. |
|
||||||
| All Rights Reserved. |
|
| All Rights Reserved. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Contributor(s): |
|
| Contributor(s): |
|
||||||
@ -51,6 +51,12 @@
|
|||||||
{$R-}
|
{$R-}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$WARN SUSPICIOUS_TYPECAST OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit synaip;
|
unit synaip;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -112,7 +118,7 @@ var
|
|||||||
// i.e. "$80"
|
// i.e. "$80"
|
||||||
if Result then
|
if Result then
|
||||||
for n := 1 to length(Value) do
|
for n := 1 to length(Value) do
|
||||||
if not (Value[n] in ['0'..'9']) then
|
if not (AnsiChar(Value[n]) in ['0'..'9']) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
Break;
|
Break;
|
||||||
@ -193,7 +199,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
s := Fetch(Host, '.');
|
s := Fetch(Host, '.');
|
||||||
i := StrToIntDef(s, 0);
|
i := StrToIntDef(s, 0);
|
||||||
Result := Result + Chr(i);
|
Result := Result + AnsiChar(i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Content: misc. procedures and functions |
|
| Content: misc. procedures and functions |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Copyright (c)1999-2008, Lukas Gebauer |
|
| Copyright (c)1999-2010, Lukas Gebauer |
|
||||||
| All rights reserved. |
|
| All rights reserved. |
|
||||||
| |
|
| |
|
||||||
| Redistribution and use in source and binary forms, with or without |
|
| Redistribution and use in source and binary forms, with or without |
|
||||||
@ -33,7 +33,7 @@
|
|||||||
| DAMAGE. |
|
| DAMAGE. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
||||||
| Portions created by Lukas Gebauer are Copyright (c) 2002-2008. |
|
| Portions created by Lukas Gebauer are Copyright (c) 2002-2010. |
|
||||||
| All Rights Reserved. |
|
| All Rights Reserved. |
|
||||||
|==============================================================================|
|
|==============================================================================|
|
||||||
| Contributor(s): |
|
| Contributor(s): |
|
||||||
@ -50,6 +50,11 @@
|
|||||||
{$Q-}
|
{$Q-}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit synamisc;
|
unit synamisc;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -1072,7 +1072,7 @@ begin
|
|||||||
if y > cSerialChunk then
|
if y > cSerialChunk then
|
||||||
y := cSerialChunk;
|
y := cSerialChunk;
|
||||||
Setlength(s, y);
|
Setlength(s, y);
|
||||||
yr := Stream.read(Pchar(s)^, y);
|
yr := Stream.read(PAnsiChar(s)^, y);
|
||||||
if yr > 0 then
|
if yr > 0 then
|
||||||
begin
|
begin
|
||||||
SetLength(s, yr);
|
SetLength(s, yr);
|
||||||
@ -1195,7 +1195,7 @@ begin
|
|||||||
if Length > 0 then
|
if Length > 0 then
|
||||||
begin
|
begin
|
||||||
Setlength(Result, Length);
|
Setlength(Result, Length);
|
||||||
x := RecvBufferEx(PChar(Result), Length , Timeout);
|
x := RecvBufferEx(PAnsiChar(Result), Length , Timeout);
|
||||||
if FLastError = sOK then
|
if FLastError = sOK then
|
||||||
SetLength(Result, x)
|
SetLength(Result, x)
|
||||||
else
|
else
|
||||||
@ -1395,7 +1395,7 @@ begin
|
|||||||
s := RecvBufferStr(cSerialChunk, Timeout);
|
s := RecvBufferStr(cSerialChunk, Timeout);
|
||||||
if FLastError <> 0 then
|
if FLastError <> 0 then
|
||||||
Exit;
|
Exit;
|
||||||
Stream.Write(Pchar(s)^, cSerialChunk);
|
Stream.Write(PAnsichar(s)^, cSerialChunk);
|
||||||
end;
|
end;
|
||||||
n := Size mod cSerialChunk;
|
n := Size mod cSerialChunk;
|
||||||
if n > 0 then
|
if n > 0 then
|
||||||
@ -1403,7 +1403,7 @@ begin
|
|||||||
s := RecvBufferStr(n, Timeout);
|
s := RecvBufferStr(n, Timeout);
|
||||||
if FLastError <> 0 then
|
if FLastError <> 0 then
|
||||||
Exit;
|
Exit;
|
||||||
Stream.Write(Pchar(s)^, n);
|
Stream.Write(PAnsichar(s)^, n);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
22
synautil.pas
22
synautil.pas
@ -60,6 +60,12 @@
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$WARN SUSPICIOUS_TYPECAST OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit synautil;
|
unit synautil;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -109,7 +115,7 @@ function AnsiCDateTime(t: TDateTime): string;
|
|||||||
{:Decode three-letter string with name of month to their month number. If string
|
{:Decode three-letter string with name of month to their month number. If string
|
||||||
not match any month name, then is returned 0. For parsing are used predefined
|
not match any month name, then is returned 0. For parsing are used predefined
|
||||||
names for English, French and German and names from system locale too.}
|
names for English, French and German and names from system locale too.}
|
||||||
function GetMonthNumber(Value: AnsiString): integer;
|
function GetMonthNumber(Value: String): integer;
|
||||||
|
|
||||||
{:Return decoded time from given string. Time must be witch separator ':'. You
|
{:Return decoded time from given string. Time must be witch separator ':'. You
|
||||||
can use "hh:mm" or "hh:mm:ss".}
|
can use "hh:mm" or "hh:mm:ss".}
|
||||||
@ -258,7 +264,7 @@ function FetchEx(var Value: string; const Delimiter, Quotation: string): string;
|
|||||||
|
|
||||||
{:If string is binary string (contains non-printable characters), then is
|
{:If string is binary string (contains non-printable characters), then is
|
||||||
returned true.}
|
returned true.}
|
||||||
function IsBinaryString(const Value: string): Boolean;
|
function IsBinaryString(const Value: AnsiString): Boolean;
|
||||||
|
|
||||||
{:return position of string terminator in string. If terminator found, then is
|
{:return position of string terminator in string. If terminator found, then is
|
||||||
returned in terminator parameter.
|
returned in terminator parameter.
|
||||||
@ -334,7 +340,7 @@ const
|
|||||||
MyDayNames: array[1..7] of AnsiString =
|
MyDayNames: array[1..7] of AnsiString =
|
||||||
('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
|
('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
|
||||||
var
|
var
|
||||||
MyMonthNames: array[0..6, 1..12] of AnsiString =
|
MyMonthNames: array[0..6, 1..12] of String =
|
||||||
(
|
(
|
||||||
('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', //rewrited by system locales
|
('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', //rewrited by system locales
|
||||||
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'),
|
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'),
|
||||||
@ -533,10 +539,10 @@ end;
|
|||||||
|
|
||||||
{==============================================================================}
|
{==============================================================================}
|
||||||
|
|
||||||
function GetMonthNumber(Value: AnsiString): integer;
|
function GetMonthNumber(Value: String): integer;
|
||||||
var
|
var
|
||||||
n: integer;
|
n: integer;
|
||||||
function TestMonth(Value: AnsiString; Index: Integer): Boolean;
|
function TestMonth(Value: String; Index: Integer): Boolean;
|
||||||
var
|
var
|
||||||
n: integer;
|
n: integer;
|
||||||
begin
|
begin
|
||||||
@ -1412,7 +1418,7 @@ end;
|
|||||||
|
|
||||||
{==============================================================================}
|
{==============================================================================}
|
||||||
|
|
||||||
function IsBinaryString(const Value: string): Boolean;
|
function IsBinaryString(const Value: AnsiString): Boolean;
|
||||||
var
|
var
|
||||||
n: integer;
|
n: integer;
|
||||||
begin
|
begin
|
||||||
@ -1420,7 +1426,7 @@ begin
|
|||||||
for n := 1 to Length(Value) do
|
for n := 1 to Length(Value) do
|
||||||
if Value[n] in [#0..#8, #10..#31] then
|
if Value[n] in [#0..#8, #10..#31] then
|
||||||
//ignore null-terminated strings
|
//ignore null-terminated strings
|
||||||
if not ((n = Length(value)) and (Value[n] = #0)) then
|
if not ((n = Length(value)) and (Value[n] = AnsiChar(#0))) then
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
Break;
|
Break;
|
||||||
@ -1791,7 +1797,7 @@ begin
|
|||||||
for n := 1 to Length(t) do
|
for n := 1 to Length(t) do
|
||||||
if t[n] = #9 then
|
if t[n] = #9 then
|
||||||
t[n] := ' ';
|
t[n] := ' ';
|
||||||
if not(t[1] in [' ', '"', ':', '=']) then
|
if not(AnsiChar(t[1]) in [' ', '"', ':', '=']) then
|
||||||
Break
|
Break
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
@ -52,6 +52,11 @@ Used RFC: RFC-854
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$H+}
|
{$H+}
|
||||||
|
|
||||||
|
{$IFDEF UNICODE}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
unit tlntsend;
|
unit tlntsend;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
Loading…
x
Reference in New Issue
Block a user