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}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit asn1util;
|
||||
|
||||
interface
|
||||
|
26
blcksock.pas
26
blcksock.pas
@ -89,6 +89,11 @@ Core with implementation basic socket classes.
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit blcksock;
|
||||
|
||||
interface
|
||||
@ -2078,6 +2083,7 @@ var
|
||||
{$ENDIF}
|
||||
begin
|
||||
b := true;
|
||||
l := 0;
|
||||
if WithSize then
|
||||
begin
|
||||
l := Stream.Size - Stream.Position;;
|
||||
@ -3209,7 +3215,7 @@ end;
|
||||
|
||||
function TSocksBlockSocket.SocksOpen: boolean;
|
||||
var
|
||||
Buf: string;
|
||||
Buf: AnsiString;
|
||||
n: integer;
|
||||
begin
|
||||
Result := False;
|
||||
@ -3239,8 +3245,8 @@ begin
|
||||
;
|
||||
2:
|
||||
begin
|
||||
Buf := #1 + char(Length(FSocksUsername)) + FSocksUsername
|
||||
+ char(Length(FSocksPassword)) + FSocksPassword;
|
||||
Buf := #1 + AnsiChar(Length(FSocksUsername)) + FSocksUsername
|
||||
+ AnsiChar(Length(FSocksPassword)) + FSocksPassword;
|
||||
SendString(Buf);
|
||||
Buf := RecvBufferStr(2, FSocksTimeout);
|
||||
if Length(Buf) < 2 then
|
||||
@ -3263,14 +3269,14 @@ end;
|
||||
function TSocksBlockSocket.SocksRequest(Cmd: Byte;
|
||||
const IP, Port: string): Boolean;
|
||||
var
|
||||
Buf: string;
|
||||
Buf: AnsiString;
|
||||
begin
|
||||
FBypassFlag := True;
|
||||
try
|
||||
if FSocksType <> ST_Socks5 then
|
||||
Buf := #4 + char(Cmd) + SocksCode(IP, Port)
|
||||
Buf := #4 + AnsiChar(Cmd) + SocksCode(IP, Port)
|
||||
else
|
||||
Buf := #5 + char(Cmd) + #0 + SocksCode(IP, Port);
|
||||
Buf := #5 + AnsiChar(Cmd) + #0 + SocksCode(IP, Port);
|
||||
SendString(Buf);
|
||||
Result := FLastError = 0;
|
||||
finally
|
||||
@ -3280,7 +3286,7 @@ end;
|
||||
|
||||
function TSocksBlockSocket.SocksResponse: Boolean;
|
||||
var
|
||||
Buf, s: string;
|
||||
Buf, s: AnsiString;
|
||||
x: integer;
|
||||
begin
|
||||
Result := False;
|
||||
@ -3313,7 +3319,7 @@ begin
|
||||
x := RecvByte(FSocksTimeout);
|
||||
if FLastError <> 0 then
|
||||
Exit;
|
||||
s := char(x) + RecvBufferStr(x, FSocksTimeout);
|
||||
s := AnsiChar(x) + RecvBufferStr(x, FSocksTimeout);
|
||||
end;
|
||||
4:
|
||||
s := RecvBufferStr(16, FSocksTimeout);
|
||||
@ -3368,10 +3374,10 @@ begin
|
||||
ip6 := StrToIP6(IP);
|
||||
Result := #4;
|
||||
for n := 0 to 15 do
|
||||
Result := Result + char(ip6[n]);
|
||||
Result := Result + AnsiChar(ip6[n]);
|
||||
end
|
||||
else
|
||||
Result := #3 + char(Length(IP)) + IP;
|
||||
Result := #3 + AnsiChar(Length(IP)) + IP;
|
||||
Result := Result + CodeInt(ResolvePort(Port));
|
||||
end;
|
||||
end;
|
||||
|
@ -54,6 +54,11 @@ daemon from ClamAV. See more about ClamAV on @LINK(http://www.clamav.net)
|
||||
{$Q-}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit clamsend;
|
||||
|
||||
interface
|
||||
@ -249,7 +254,6 @@ end;
|
||||
function TClamSend.ScanStream2(const Value: TStream): AnsiString;
|
||||
var
|
||||
i: integer;
|
||||
s: AnsiString;
|
||||
begin
|
||||
Result := '';
|
||||
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 |
|
||||
|==============================================================================|
|
||||
@ -54,6 +54,11 @@ Used RFC: RFC-1035, RFC-1183, RFC1706, RFC1712, RFC2163, RFC2230
|
||||
{$Q-}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit dnssend;
|
||||
|
||||
interface
|
||||
@ -248,13 +253,13 @@ begin
|
||||
for n := 1 to Length(Value) do
|
||||
if Value[n] = '.' then
|
||||
begin
|
||||
Result := Result + Char(Length(s)) + s;
|
||||
Result := Result + AnsiChar(Length(s)) + s;
|
||||
s := '';
|
||||
end
|
||||
else
|
||||
s := s + Value[n];
|
||||
if s <> '' then
|
||||
Result := Result + Char(Length(s)) + s;
|
||||
Result := Result + AnsiChar(Length(s)) + s;
|
||||
Result := Result + #0;
|
||||
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 |
|
||||
|==============================================================================|
|
||||
@ -53,6 +53,11 @@ Used RFC: RFC-959, RFC-2228, RFC-2428
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit ftpsend;
|
||||
|
||||
interface
|
||||
@ -84,18 +89,17 @@ type
|
||||
listing of FTP server.}
|
||||
TFTPListRec = class(TObject)
|
||||
private
|
||||
FFileName: string;
|
||||
FFileName: String;
|
||||
FDirectory: Boolean;
|
||||
FReadable: Boolean;
|
||||
FFileSize: Longint;
|
||||
FFileTime: TDateTime;
|
||||
FOriginalLine: string;
|
||||
FMask: string;
|
||||
FPermission: string;
|
||||
FPermission: String;
|
||||
public
|
||||
{: You can assign another TFTPListRec to this object.}
|
||||
procedure Assign(Value: TFTPListRec); virtual;
|
||||
published
|
||||
{:name of file}
|
||||
property FileName: string read FFileName write FFileName;
|
||||
{:if name is subdirectory not file.}
|
||||
@ -135,16 +139,16 @@ type
|
||||
YearTime: string;
|
||||
Year: string;
|
||||
Hours: string;
|
||||
HoursModif: string;
|
||||
HoursModif: Ansistring;
|
||||
Minutes: string;
|
||||
Seconds: string;
|
||||
Size: string;
|
||||
Permissions: string;
|
||||
Size: Ansistring;
|
||||
Permissions: Ansistring;
|
||||
DirFlag: string;
|
||||
function GetListItem(Index: integer): TFTPListRec; virtual;
|
||||
function ParseEPLF(Value: string): Boolean; virtual;
|
||||
procedure ClearStore; virtual;
|
||||
function ParseByMask(Value, NextValue, Mask: string): Integer; virtual;
|
||||
function ParseByMask(Value, NextValue, Mask: ansistring): Integer; virtual;
|
||||
function CheckValues: Boolean; virtual;
|
||||
procedure FillRecord(const Value: TFTPListRec); virtual;
|
||||
public
|
||||
@ -510,7 +514,7 @@ end;
|
||||
|
||||
function TFTPSend.ReadResult: Integer;
|
||||
var
|
||||
s, c: string;
|
||||
s, c: AnsiString;
|
||||
begin
|
||||
FFullResult.Clear;
|
||||
c := '';
|
||||
@ -820,7 +824,7 @@ end;
|
||||
procedure TFTPSend.ParseRemoteEPSV(Value: string);
|
||||
var
|
||||
n: integer;
|
||||
s, v: string;
|
||||
s, v: AnsiString;
|
||||
begin
|
||||
s := SeparateRight(Value, '(');
|
||||
s := Trim(SeparateLeft(s, ')'));
|
||||
@ -1338,11 +1342,11 @@ begin
|
||||
DirFlag := '';
|
||||
end;
|
||||
|
||||
function TFTPList.ParseByMask(Value, NextValue, Mask: string): Integer;
|
||||
function TFTPList.ParseByMask(Value, NextValue, Mask: AnsiString): Integer;
|
||||
var
|
||||
Ivalue, IMask: integer;
|
||||
MaskC, LastMaskC: Char;
|
||||
c: char;
|
||||
MaskC, LastMaskC: AnsiChar;
|
||||
c: AnsiChar;
|
||||
s: string;
|
||||
begin
|
||||
ClearStore;
|
||||
|
@ -53,6 +53,11 @@ Used RFC: RFC-1350
|
||||
{$Q-}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit ftptsend;
|
||||
|
||||
interface
|
||||
|
@ -58,6 +58,11 @@ Used RFC: RFC-1867, RFC-1947, RFC-2388, RFC-2616
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit httpsend;
|
||||
|
||||
interface
|
||||
|
@ -52,6 +52,11 @@ Used RFC: RFC-2060, RFC-2595
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit imapsend;
|
||||
|
||||
interface
|
||||
|
@ -52,6 +52,11 @@ Used RFC: RFC-2251, RFC-2254, RFC-2829, RFC-2830
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit ldapsend;
|
||||
|
||||
interface
|
||||
|
@ -53,6 +53,11 @@ Used RFC: RFC-2047, RFC-2231
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit mimeinln;
|
||||
|
||||
interface
|
||||
|
@ -55,6 +55,11 @@ Used RFC: RFC-2045
|
||||
{$Q-}
|
||||
{$R-}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit mimepart;
|
||||
|
||||
interface
|
||||
|
@ -53,6 +53,12 @@ Used RFC: RFC-977, RFC-2980
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$WARN SUSPICIOUS_TYPECAST OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit nntpsend;
|
||||
|
||||
interface
|
||||
|
25
pingsend.pas
25
pingsend.pas
@ -73,6 +73,11 @@ Note: This unit is NOT portable to .NET!
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit pingsend;
|
||||
|
||||
interface
|
||||
@ -113,7 +118,7 @@ type
|
||||
TPINGSend = class(TSynaClient)
|
||||
private
|
||||
FSock: TICMPBlockSocket;
|
||||
FBuffer: string;
|
||||
FBuffer: Ansistring;
|
||||
FSeq: Integer;
|
||||
FId: Integer;
|
||||
FPacketSize: Integer;
|
||||
@ -128,8 +133,8 @@ type
|
||||
FReplyErrorDesc: string;
|
||||
FTTL: Byte;
|
||||
Fsin: TVarSin;
|
||||
function Checksum(Value: string): Word;
|
||||
function Checksum6(Value: string): Word;
|
||||
function Checksum(Value: AnsiString): Word;
|
||||
function Checksum6(Value: AnsiString): Word;
|
||||
function ReadPacket: Boolean;
|
||||
procedure TranslateError;
|
||||
procedure TranslateErrorIpHlp(value: integer);
|
||||
@ -220,7 +225,7 @@ type
|
||||
TOS: Byte;
|
||||
Flags: Byte;
|
||||
OptionsSize: Byte;
|
||||
OptionsData: PChar;
|
||||
OptionsData: PAnsiChar;
|
||||
end;
|
||||
PIP_OPTION_INFORMATION = ^TIP_OPTION_INFORMATION;
|
||||
|
||||
@ -443,7 +448,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPINGSend.Checksum(Value: string): Word;
|
||||
function TPINGSend.Checksum(Value: AnsiString): Word;
|
||||
var
|
||||
CkSum: integer;
|
||||
Num, Remain: Integer;
|
||||
@ -465,7 +470,7 @@ begin
|
||||
Result := Word(not CkSum);
|
||||
end;
|
||||
|
||||
function TPINGSend.Checksum6(Value: string): Word;
|
||||
function TPINGSend.Checksum6(Value: AnsiString): Word;
|
||||
const
|
||||
IOC_OUT = $40000000;
|
||||
IOC_IN = $80000000;
|
||||
@ -474,7 +479,7 @@ const
|
||||
SIO_ROUTING_INTERFACE_QUERY = 20 or IOC_WS2 or IOC_INOUT;
|
||||
var
|
||||
ICMP6Ptr: ^TICMP6Packet;
|
||||
s: string;
|
||||
s: AnsiString;
|
||||
b: integer;
|
||||
ip6: TSockAddrIn6;
|
||||
x: integer;
|
||||
@ -578,7 +583,7 @@ var
|
||||
PingHandle: integer;
|
||||
r: integer;
|
||||
ipo: TIP_OPTION_INFORMATION;
|
||||
RBuff: string;
|
||||
RBuff: Ansistring;
|
||||
ip4reply: PICMP_ECHO_REPLY;
|
||||
ip6reply: PICMPV6_ECHO_REPLY;
|
||||
ip6: TSockAddrIn6;
|
||||
@ -602,7 +607,7 @@ begin
|
||||
begin
|
||||
FillChar(ip6, sizeof(ip6), 0);
|
||||
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
|
||||
begin
|
||||
RBuff := #0 + #0 + RBuff;
|
||||
@ -617,7 +622,7 @@ begin
|
||||
else
|
||||
begin
|
||||
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
|
||||
begin
|
||||
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 |
|
||||
|==============================================================================|
|
||||
@ -51,6 +51,12 @@ Used RFC: RFC-1734, RFC-1939, RFC-2195, RFC-2449, RFC-2595
|
||||
{$MODE DELPHI}
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
{$M+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit pop3send;
|
||||
|
||||
@ -225,7 +231,7 @@ end;
|
||||
|
||||
function TPOP3Send.ReadResult(Full: Boolean): Integer;
|
||||
var
|
||||
s: string;
|
||||
s: AnsiString;
|
||||
begin
|
||||
Result := 0;
|
||||
FFullResult.Clear;
|
||||
|
@ -53,6 +53,11 @@ Used RFC: RFC-1869, RFC-1870, RFC-1893, RFC-2034, RFC-2104, RFC-2195, RFC-2487,
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit smtpsend;
|
||||
|
||||
interface
|
||||
@ -316,7 +321,7 @@ end;
|
||||
|
||||
function TSMTPSend.ReadResult: Integer;
|
||||
var
|
||||
s: string;
|
||||
s: String;
|
||||
begin
|
||||
Result := 0;
|
||||
FFullResult.Clear;
|
||||
|
@ -56,6 +56,11 @@ Used RFC: RFC-1157, RFC-1901, RFC-3412, RFC-3414, RFC-3416
|
||||
{$Q-}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit snmpsend;
|
||||
|
||||
interface
|
||||
|
@ -101,7 +101,7 @@ type
|
||||
FMaxSyncDiff: double;
|
||||
FSyncTime: Boolean;
|
||||
FSock: TUDPBlockSocket;
|
||||
FBuffer: string;
|
||||
FBuffer: AnsiString;
|
||||
FLi, FVn, Fmode : byte;
|
||||
function StrToNTP(const Value: AnsiString): TNtp;
|
||||
function NTPtoStr(const Value: Tntp): AnsiString;
|
||||
|
@ -80,6 +80,11 @@ accepting of new connections!
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit ssl_openssl;
|
||||
|
||||
interface
|
||||
|
@ -60,6 +60,11 @@ Internal routines knows all major charsets for Europe or America. For East-Asian
|
||||
{$Q-}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit synachar;
|
||||
|
||||
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 |
|
||||
|==============================================================================|
|
||||
| Copyright (c)1999-2007, Lukas Gebauer |
|
||||
| Copyright (c)1999-2010, Lukas Gebauer |
|
||||
| All rights reserved. |
|
||||
| |
|
||||
| Redistribution and use in source and binary forms, with or without |
|
||||
@ -33,7 +33,7 @@
|
||||
| DAMAGE. |
|
||||
|==============================================================================|
|
||||
| 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. |
|
||||
|==============================================================================|
|
||||
| Contributor(s): |
|
||||
@ -50,6 +50,12 @@
|
||||
{$R-}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$WARN SUSPICIOUS_TYPECAST OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit synacode;
|
||||
|
||||
interface
|
||||
@ -66,7 +72,7 @@ const
|
||||
['=', '(', ')', '[', ']', '<', '>', ':', ';', ',', '@', '/', '?', '\',
|
||||
'"', '_'];
|
||||
NonAsciiChar: TSpecials =
|
||||
[Char(0)..Char(31), Char(127)..Char(255)];
|
||||
[#0..#31, #127..#255];
|
||||
URLFullSpecialChar: TSpecials =
|
||||
[';', '/', '?', ':', '@', '=', '&', '#', '+'];
|
||||
URLSpecialChar: TSpecials =
|
||||
|
@ -1,9 +1,9 @@
|
||||
{==============================================================================|
|
||||
| Project : Ararat Synapse | 001.000.000 |
|
||||
| Project : Ararat Synapse | 001.000.001 |
|
||||
|==============================================================================|
|
||||
| Content: Encryption support |
|
||||
|==============================================================================|
|
||||
| Copyright (c)2007, Lukas Gebauer |
|
||||
| Copyright (c)2007-2010, Lukas Gebauer |
|
||||
| All rights reserved. |
|
||||
| |
|
||||
| Redistribution and use in source and binary forms, with or without |
|
||||
@ -33,7 +33,7 @@
|
||||
| DAMAGE. |
|
||||
|==============================================================================|
|
||||
| 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. |
|
||||
| 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-}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit synacrypt;
|
||||
|
||||
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 |
|
||||
|==============================================================================|
|
||||
| Copyright (c)2008, Lukas Gebauer |
|
||||
| Copyright (c)2008-2010, Lukas Gebauer |
|
||||
| All rights reserved. |
|
||||
| |
|
||||
| Redistribution and use in source and binary forms, with or without |
|
||||
@ -33,7 +33,7 @@
|
||||
| DAMAGE. |
|
||||
|==============================================================================|
|
||||
| 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. |
|
||||
|==============================================================================|
|
||||
| Contributor(s): |
|
||||
@ -47,6 +47,10 @@
|
||||
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;
|
||||
|
||||
|
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 |
|
||||
|==============================================================================|
|
||||
| Copyright (c)2006-2009, Lukas Gebauer |
|
||||
| Copyright (c)2006-2010, Lukas Gebauer |
|
||||
| All rights reserved. |
|
||||
| |
|
||||
| Redistribution and use in source and binary forms, with or without |
|
||||
@ -33,7 +33,7 @@
|
||||
| DAMAGE. |
|
||||
|==============================================================================|
|
||||
| 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. |
|
||||
|==============================================================================|
|
||||
| Contributor(s): |
|
||||
@ -51,6 +51,12 @@
|
||||
{$R-}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$WARN SUSPICIOUS_TYPECAST OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit synaip;
|
||||
|
||||
interface
|
||||
@ -112,7 +118,7 @@ var
|
||||
// i.e. "$80"
|
||||
if Result then
|
||||
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
|
||||
Result := False;
|
||||
Break;
|
||||
@ -193,7 +199,7 @@ begin
|
||||
begin
|
||||
s := Fetch(Host, '.');
|
||||
i := StrToIntDef(s, 0);
|
||||
Result := Result + Chr(i);
|
||||
Result := Result + AnsiChar(i);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|==============================================================================|
|
||||
| Content: misc. procedures and functions |
|
||||
|==============================================================================|
|
||||
| Copyright (c)1999-2008, Lukas Gebauer |
|
||||
| Copyright (c)1999-2010, Lukas Gebauer |
|
||||
| All rights reserved. |
|
||||
| |
|
||||
| Redistribution and use in source and binary forms, with or without |
|
||||
@ -33,7 +33,7 @@
|
||||
| DAMAGE. |
|
||||
|==============================================================================|
|
||||
| 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. |
|
||||
|==============================================================================|
|
||||
| Contributor(s): |
|
||||
@ -50,6 +50,11 @@
|
||||
{$Q-}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit synamisc;
|
||||
|
||||
interface
|
||||
|
@ -1072,7 +1072,7 @@ begin
|
||||
if y > cSerialChunk then
|
||||
y := cSerialChunk;
|
||||
Setlength(s, y);
|
||||
yr := Stream.read(Pchar(s)^, y);
|
||||
yr := Stream.read(PAnsiChar(s)^, y);
|
||||
if yr > 0 then
|
||||
begin
|
||||
SetLength(s, yr);
|
||||
@ -1195,7 +1195,7 @@ begin
|
||||
if Length > 0 then
|
||||
begin
|
||||
Setlength(Result, Length);
|
||||
x := RecvBufferEx(PChar(Result), Length , Timeout);
|
||||
x := RecvBufferEx(PAnsiChar(Result), Length , Timeout);
|
||||
if FLastError = sOK then
|
||||
SetLength(Result, x)
|
||||
else
|
||||
@ -1395,7 +1395,7 @@ begin
|
||||
s := RecvBufferStr(cSerialChunk, Timeout);
|
||||
if FLastError <> 0 then
|
||||
Exit;
|
||||
Stream.Write(Pchar(s)^, cSerialChunk);
|
||||
Stream.Write(PAnsichar(s)^, cSerialChunk);
|
||||
end;
|
||||
n := Size mod cSerialChunk;
|
||||
if n > 0 then
|
||||
@ -1403,7 +1403,7 @@ begin
|
||||
s := RecvBufferStr(n, Timeout);
|
||||
if FLastError <> 0 then
|
||||
Exit;
|
||||
Stream.Write(Pchar(s)^, n);
|
||||
Stream.Write(PAnsichar(s)^, n);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
22
synautil.pas
22
synautil.pas
@ -60,6 +60,12 @@
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$WARN SUSPICIOUS_TYPECAST OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit synautil;
|
||||
|
||||
interface
|
||||
@ -109,7 +115,7 @@ function AnsiCDateTime(t: TDateTime): 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
|
||||
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
|
||||
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
|
||||
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
|
||||
returned in terminator parameter.
|
||||
@ -334,7 +340,7 @@ const
|
||||
MyDayNames: array[1..7] of AnsiString =
|
||||
('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
|
||||
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
|
||||
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'),
|
||||
@ -533,10 +539,10 @@ end;
|
||||
|
||||
{==============================================================================}
|
||||
|
||||
function GetMonthNumber(Value: AnsiString): integer;
|
||||
function GetMonthNumber(Value: String): integer;
|
||||
var
|
||||
n: integer;
|
||||
function TestMonth(Value: AnsiString; Index: Integer): Boolean;
|
||||
function TestMonth(Value: String; Index: Integer): Boolean;
|
||||
var
|
||||
n: integer;
|
||||
begin
|
||||
@ -1412,7 +1418,7 @@ end;
|
||||
|
||||
{==============================================================================}
|
||||
|
||||
function IsBinaryString(const Value: string): Boolean;
|
||||
function IsBinaryString(const Value: AnsiString): Boolean;
|
||||
var
|
||||
n: integer;
|
||||
begin
|
||||
@ -1420,7 +1426,7 @@ begin
|
||||
for n := 1 to Length(Value) do
|
||||
if Value[n] in [#0..#8, #10..#31] then
|
||||
//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
|
||||
Result := True;
|
||||
Break;
|
||||
@ -1791,7 +1797,7 @@ begin
|
||||
for n := 1 to Length(t) do
|
||||
if t[n] = #9 then
|
||||
t[n] := ' ';
|
||||
if not(t[1] in [' ', '"', ':', '=']) then
|
||||
if not(AnsiChar(t[1]) in [' ', '"', ':', '=']) then
|
||||
Break
|
||||
else
|
||||
begin
|
||||
|
@ -52,6 +52,11 @@ Used RFC: RFC-854
|
||||
{$ENDIF}
|
||||
{$H+}
|
||||
|
||||
{$IFDEF UNICODE}
|
||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||
{$ENDIF}
|
||||
|
||||
unit tlntsend;
|
||||
|
||||
interface
|
||||
|
Loading…
x
Reference in New Issue
Block a user