From 283ae2bad543f36fe786712d1634a7580a0c9763 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 5 Aug 2013 19:24:41 +0000 Subject: [PATCH] lazutils: merged code git-svn-id: trunk@42360 - --- components/lazutils/fileutil.inc | 16 +--------------- components/lazutils/fileutil.pas | 17 +---------------- components/lazutils/lazfileutils.pas | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 36 deletions(-) diff --git a/components/lazutils/fileutil.inc b/components/lazutils/fileutil.inc index 4954f9d4d8..96dc43db6c 100644 --- a/components/lazutils/fileutil.inc +++ b/components/lazutils/fileutil.inc @@ -398,24 +398,10 @@ end; function ExtractFileNameOnly(const AFilename: string): string; ------------------------------------------------------------------------------} function ExtractFileNameOnly(const AFilename: string): string; -var - StartPos: Integer; - ExtPos: Integer; begin - StartPos:=length(AFilename)+1; - while (StartPos>1) - and (AFilename[StartPos-1]<>PathDelim) - {$IFDEF Windows}and (AFilename[StartPos-1]<>':'){$ENDIF} - do - dec(StartPos); - ExtPos:=length(AFilename); - while (ExtPos>=StartPos) and (AFilename[ExtPos]<>'.') do - dec(ExtPos); - if (ExtPos1) + and (AFilename[StartPos-1]<>PathDelim) + {$IFDEF Windows}and (AFilename[StartPos-1]<>':'){$ENDIF} + do + dec(StartPos); + ExtPos:=length(AFilename); + while (ExtPos>=StartPos) and (AFilename[ExtPos]<>'.') do + dec(ExtPos); + if (ExtPos