Article View: borland.public.cppbuilder.internet.socket
Article #3530Re: Installing Indy9 dev snapshot
From: Pawel Salawa
Date: Fri, 19 Aug 2005 06:44
Date: Fri, 19 Aug 2005 06:44
67 lines
2825 bytes
2825 bytes
> You must not have
> made the change correctly in your install.
I've changed the function to looks like:
Function PosIdx (const ASubStr,AStr: AnsiString; AStartPos: Cardinal):
Cardinal;
var
lpSubStr,lpS: PChar;
LenSubStr,LenS: Cardinal;
LChar: Char;
Begin
Result := 0; //not found
LenSubStr := Length(ASubStr);
LenS := Length(AStr);
// if (LenSubStr = 0) or (LenSubStr > LenS) or (AStartPos > LenS) then
begin
if (LenSubStr = 0) or (LenSubStr > LenS) or ((AStartPos+LenSubStr-1) >
LenS) then begin
Exit;
end;//if
lpSubStr := Pointer(ASubStr);
lpS := Pointer(AStr);
if AStartPos > 1 then begin
Inc(lpS, AStartPos - 1);
Dec(LenS, AStartPos - 1);
end;//if
if LenS <= 0 then begin
Exit;
end;
LChar := lpSubStr[0]; //first char
Inc(lpSubStr); //next char
Dec(LenSubStr); //len w/o first char
Dec(LenS, LenSubStr); //Length(S)-Length(SubStr) +1(!) MUST BE >0
if LenS <= 0 then begin
Exit;
end;//if
// RLebeau - shouldn't this code use StrPos() instead?
while LenS > 0 do begin
if lpS^ = LChar then begin
Inc(lpS);
if CompareMem(lpS, lpSubStr, LenSubStr) then begin
Result := lpS-Pointer(AStr); //+1 already here
Exit;
end;
end else begin
Inc(lpS);
end;
Dec(LenS);
end;//while
End;//PosIdx
Then I've uninstalled Indy from borland (just to be sure), closed BCB,
deleted whole indy\C6 directory and executed fullc6.bat to recreate and
recompile indy for bcb6. Everything has compiled, so I started BCB and
installed new Indy. Is there anything else I should do?
--
Googie
Technical Details
Message-ID:
<43057fae$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4302dc69@newsgroups.borland.com> <4302f8db$1@newsgroups.borland.com> <43033215@newsgroups.borland.com> <43037cfa$1@newsgroups.borland.com> <430434cb$1@newsgroups.borland.com> <43044e0f$1@newsgroups.borland.com> <43044f3e$1@newsgroups.borland.com> <4304a132@newsgroups.borland.com> <4304bae2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,24377dca02349da1 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Pawel Salawa" <no@spam.org> Newsgroups: borland.public.cppbuilder.internet.socket References: <4302dc69@newsgroups.borland.com> <4302f8db$1@newsgroups.borland.com> <43033215@newsgroups.borland.com> <43037cfa$1@newsgroups.borland.com> <430434cb$1@newsgroups.borland.com> <43044e0f$1@newsgroups.borland.com> <43044f3e$1@newsgroups.borland.com> <4304a132@newsgroups.borland.com> <4304bae2$1@newsgroups.borland.com> Subject: Re: Installing Indy9 dev snapshot Date: Fri, 19 Aug 2005 08:44:11 +0200 Lines: 69 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 195.214.216.6 Message-ID: <43057fae$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124433838 195.214.216.6 (18 Aug 2005 23:43:58 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail