mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 19:16:08 +02:00
fixed searching units first lowercase
git-svn-id: trunk@5879 -
This commit is contained in:
parent
c76d013e4e
commit
f7390aea11
@ -1225,6 +1225,7 @@ var
|
|||||||
APath:=ADir;
|
APath:=ADir;
|
||||||
if (APath<>'') and (APath[length(APath)]<>PathDelim) then
|
if (APath<>'') and (APath[length(APath)]<>PathDelim) then
|
||||||
APath:=APath+PathDelim;
|
APath:=APath+PathDelim;
|
||||||
|
// search as FPC: first lowercase, then keeping case, then uppercase
|
||||||
if SearchSource then begin
|
if SearchSource then begin
|
||||||
{$IFNDEF win32}
|
{$IFNDEF win32}
|
||||||
if LoadFile(ADir+lowercase(AnUnitName)+'.pp',Result) then exit;
|
if LoadFile(ADir+lowercase(AnUnitName)+'.pp',Result) then exit;
|
||||||
@ -1232,11 +1233,18 @@ var
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if LoadFile(ADir+AnUnitName+'.pp',Result) then exit;
|
if LoadFile(ADir+AnUnitName+'.pp',Result) then exit;
|
||||||
if LoadFile(ADir+AnUnitName+'.pas',Result) then exit;
|
if LoadFile(ADir+AnUnitName+'.pas',Result) then exit;
|
||||||
|
{$IFNDEF win32}
|
||||||
|
if LoadFile(ADir+UpperCaseStr(AnUnitName)+'.pp',Result) then exit;
|
||||||
|
if LoadFile(ADir+UpperCaseStr(AnUnitName)+'.pas',Result) then exit;
|
||||||
|
{$ENDIF}
|
||||||
end else begin
|
end else begin
|
||||||
{$IFNDEF win32}
|
{$IFNDEF win32}
|
||||||
if LoadFile(ADir+lowercase(AnUnitName)+CompiledSrcExt,Result) then exit;
|
if LoadFile(ADir+lowercase(AnUnitName)+CompiledSrcExt,Result) then exit;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if LoadFile(ADir+AnUnitName+CompiledSrcExt,Result) then exit;
|
if LoadFile(ADir+AnUnitName+CompiledSrcExt,Result) then exit;
|
||||||
|
{$IFNDEF win32}
|
||||||
|
if LoadFile(ADir+UpperCaseStr(AnUnitName)+CompiledSrcExt,Result) then exit;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
Result:=nil;
|
Result:=nil;
|
||||||
end;
|
end;
|
||||||
|
@ -5067,9 +5067,10 @@ var ActiveSrcEdit: TSourceEditor;
|
|||||||
+CurPath;
|
+CurPath;
|
||||||
end;
|
end;
|
||||||
for c:=0 to 2 do begin
|
for c:=0 to 2 do begin
|
||||||
|
// FPC searches first lowercase, then keeping case, then uppercase
|
||||||
case c of
|
case c of
|
||||||
0: TempFile:=FName;
|
0: TempFile:=LowerCase(FName);
|
||||||
1: TempFile:=LowerCase(FName);
|
1: TempFile:=FName;
|
||||||
2: TempFile:=UpperCase(FName);
|
2: TempFile:=UpperCase(FName);
|
||||||
end;
|
end;
|
||||||
if ExtractFileExt(TempFile)='' then begin
|
if ExtractFileExt(TempFile)='' then begin
|
||||||
@ -10607,6 +10608,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.762 2004/08/29 08:59:37 mattias
|
||||||
|
fixed searching units first lowercase
|
||||||
|
|
||||||
Revision 1.761 2004/08/29 08:54:39 mattias
|
Revision 1.761 2004/08/29 08:54:39 mattias
|
||||||
fixed aborting new project
|
fixed aborting new project
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user