git-svn-id: trunk@6466 -
This commit is contained in:
mattias 2005-01-03 11:41:28 +00:00
parent 4d8cc68ce2
commit 4e074259bb

View File

@ -39,10 +39,8 @@ uses
} }
// comments // comments
function FindNextNonSpace(const ASource: string; StartPos: integer function FindNextNonSpace(const ASource: string; StartPos: integer): integer;
): integer; function FindPrevNonSpace(const ASource: string; StartPos: integer): integer;
function FindPrevNonSpace(const ASource: string; StartPos: integer
): integer;
function FindCommentEnd(const ASource: string; StartPos: integer; function FindCommentEnd(const ASource: string; StartPos: integer;
NestedComments: boolean): integer; NestedComments: boolean): integer;
function IsCommentEnd(const ASource: string; EndPos: integer): boolean; function IsCommentEnd(const ASource: string; EndPos: integer): boolean;
@ -1149,10 +1147,7 @@ end;
function FindPrevNonSpace(const ASource: string; StartPos: integer function FindPrevNonSpace(const ASource: string; StartPos: integer
): integer; ): integer;
var
SrcLen: integer;
begin begin
SrcLen:=length(ASource);
Result:=StartPos; Result:=StartPos;
while (Result>=1) and (ASource[Result] in [' ',#9,#10,#13]) do while (Result>=1) and (ASource[Result] in [' ',#9,#10,#13]) do
dec(Result); dec(Result);