mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:56:12 +02:00
clean up
git-svn-id: trunk@8344 -
This commit is contained in:
parent
bb99f5f64e
commit
51d6b1a88a
@ -480,7 +480,7 @@ type
|
||||
function DefineActionNameToAction(const s: string): TDefineAction;
|
||||
begin
|
||||
for Result:=Low(TDefineAction) to High(TDefineAction) do
|
||||
if AnsiCompareText(s,DefineActionNames[Result])=0 then exit;
|
||||
if CompareText(s,DefineActionNames[Result])=0 then exit;
|
||||
Result:=da_None;
|
||||
end;
|
||||
|
||||
@ -501,13 +501,13 @@ var Link1, Link2: TUnitNameLink;
|
||||
begin
|
||||
Link1:=TUnitNameLink(NodeData1);
|
||||
Link2:=TUnitNameLink(NodeData2);
|
||||
Result:=AnsiCompareText(Link1.UnitName,Link2.UnitName);
|
||||
Result:=CompareText(Link1.UnitName,Link2.UnitName);
|
||||
end;
|
||||
|
||||
function CompareUnitNameWithUnitLinkNode(UnitName: Pointer;
|
||||
NodeData: pointer): integer;
|
||||
begin
|
||||
Result:=AnsiCompareText(String(UnitName),TUnitNameLink(NodeData).UnitName);
|
||||
Result:=CompareText(String(UnitName),TUnitNameLink(NodeData).UnitName);
|
||||
end;
|
||||
|
||||
function CompareDirectoryDefines(NodeData1, NodeData2: pointer): integer;
|
||||
@ -1289,7 +1289,7 @@ begin
|
||||
// node has a name -> test if already exists
|
||||
PosNode:=FirstSibling;
|
||||
while (PosNode<>nil)
|
||||
and (AnsiCompareText(PosNode.Name,NewNode.Name)<>0) do
|
||||
and (CompareText(PosNode.Name,NewNode.Name)<>0) do
|
||||
PosNode:=PosNode.Next;
|
||||
if PosNode<>nil then begin
|
||||
// node with same name already exists -> check if it is a copy
|
||||
@ -1314,7 +1314,7 @@ begin
|
||||
// -> search MergeNameInFront
|
||||
PosNode:=LastSibling;
|
||||
while (PosNode<>nil)
|
||||
and (AnsiCompareText(PosNode.Name,NewNode.MergeNameInFront)<>0) do
|
||||
and (CompareText(PosNode.Name,NewNode.MergeNameInFront)<>0) do
|
||||
PosNode:=PosNode.Prior;
|
||||
if PosNode<>nil then begin
|
||||
// MergeNameInFront found -> insert behind
|
||||
@ -1328,7 +1328,7 @@ begin
|
||||
// -> search MergeNameBehind
|
||||
PosNode:=FirstSibling;
|
||||
while (PosNode<>nil)
|
||||
and (AnsiCompareText(PosNode.Name,NewNode.MergeNameBehind)<>0) do
|
||||
and (CompareText(PosNode.Name,NewNode.MergeNameBehind)<>0) do
|
||||
PosNode:=PosNode.Next;
|
||||
if PosNode<>nil then begin
|
||||
// MergeNameBehind found -> insert in front
|
||||
@ -1601,7 +1601,7 @@ function TDefineTemplate.FindByName(const AName: string; WithSubChilds,
|
||||
WithNextSiblings: boolean): TDefineTemplate;
|
||||
var ANode: TDefineTemplate;
|
||||
begin
|
||||
if AnsiCompareText(AName,Name)=0 then begin
|
||||
if CompareText(AName,Name)=0 then begin
|
||||
Result:=Self;
|
||||
end else begin
|
||||
if WithSubChilds and (FirstChild<>nil) then
|
||||
@ -2679,7 +2679,7 @@ var
|
||||
begin
|
||||
Result:=LastDefTempl;
|
||||
while (Result<>nil)
|
||||
and (AnsiComparetext(Result.Variable,SymbolName)<>0) do
|
||||
and (Comparetext(Result.Variable,SymbolName)<>0) do
|
||||
Result:=Result.Prior;
|
||||
end;
|
||||
|
||||
@ -2715,7 +2715,7 @@ var
|
||||
UpLine:=UpperCaseStr(Line);
|
||||
i:=length(ShortTestFile);
|
||||
if (length(Line)>i)
|
||||
and (AnsiCompareText(LeftStr(Line,i),ShortTestFile)=0)
|
||||
and (CompareText(LeftStr(Line,i),ShortTestFile)=0)
|
||||
and (Line[i+1]='(') then begin
|
||||
inc(i);
|
||||
while (i<length(Line)) and (Line[i]<>')') do inc(i);
|
||||
@ -2766,7 +2766,7 @@ var CmdLine: string;
|
||||
SrcOS: string;
|
||||
SrcOS2: String;
|
||||
begin
|
||||
//DebugLn('CreateFPCTemplate ',PPC386Path,' ',PPCOptions);
|
||||
//DebugLn('TDefinePool.CreateFPCTemplate PPC386Path="',PPC386Path,'" PPCOptions="',PPCOptions,'"');
|
||||
Result:=nil;
|
||||
UnitSearchPath:='';
|
||||
TargetOS:='';
|
||||
@ -2775,15 +2775,16 @@ begin
|
||||
if (PPC386Path='') or (not FileIsExecutable(PPC386Path)) then exit;
|
||||
LastDefTempl:=nil;
|
||||
// find all initial compiler macros and all unit paths
|
||||
// -> ask compiler with the -va switch
|
||||
// -> ask compiler with the -vm -vt switch
|
||||
SetLength(Buf,1024);
|
||||
try
|
||||
CmdLine:=PPC386Path+' -va ';
|
||||
CmdLine:=PPC386Path+' -vm -vt ';
|
||||
if FileExistsCached(EnglishErrorMsgFilename) then
|
||||
CmdLine:=CmdLine+'-Fr'+EnglishErrorMsgFilename+' ';
|
||||
if PPCOptions<>'' then
|
||||
CmdLine:=CmdLine+PPCOptions+' ';
|
||||
CmdLine:=CmdLine+TestPascalFile;
|
||||
//DebugLn('TDefinePool.CreateFPCTemplate CmdLine="',CmdLine,'"');
|
||||
ShortTestFile:=ExtractFileName(TestPascalFile);
|
||||
|
||||
TheProcess := TProcess.Create(nil);
|
||||
@ -2794,9 +2795,9 @@ begin
|
||||
TheProcess.Execute;
|
||||
OutputLine:='';
|
||||
repeat
|
||||
if TheProcess.Output<>nil then
|
||||
OutLen:=TheProcess.Output.Read(Buf[1],length(Buf))
|
||||
else
|
||||
if (TheProcess.Output<>nil) then begin
|
||||
OutLen:=TheProcess.Output.Read(Buf[1],length(Buf));
|
||||
end else
|
||||
OutLen:=0;
|
||||
LineStart:=1;
|
||||
i:=1;
|
||||
@ -2816,8 +2817,10 @@ begin
|
||||
until OutLen=0;
|
||||
TheProcess.WaitOnExit;
|
||||
finally
|
||||
//DebugLn('TDefinePool.CreateFPCTemplate OutputLine="',OutputLine,'"');
|
||||
TheProcess.Free;
|
||||
end;
|
||||
//DebugLn('TDefinePool.CreateFPCTemplate First done');
|
||||
|
||||
// ask for target operating system -> ask compiler with switch -iTO
|
||||
CmdLine:=PPC386Path;
|
||||
@ -2831,7 +2834,7 @@ begin
|
||||
TheProcess.ShowWindow := swoNone;
|
||||
try
|
||||
TheProcess.Execute;
|
||||
if TheProcess.Output<>nil then
|
||||
if (TheProcess.Output<>nil) then
|
||||
OutLen:=TheProcess.Output.Read(Buf[1],length(Buf))
|
||||
else
|
||||
OutLen:=0;
|
||||
@ -2863,6 +2866,7 @@ begin
|
||||
inc(i);
|
||||
end;
|
||||
TheProcess.WaitOnExit;
|
||||
//DebugLn('TDefinePool.CreateFPCTemplate target OS done');
|
||||
finally
|
||||
TheProcess.Free;
|
||||
end;
|
||||
@ -2896,6 +2900,7 @@ begin
|
||||
inc(i);
|
||||
end;
|
||||
TheProcess.WaitOnExit;
|
||||
//DebugLn('TDefinePool.CreateFPCTemplate target CPU done');
|
||||
finally
|
||||
TheProcess.Free;
|
||||
end;
|
||||
@ -2906,6 +2911,7 @@ begin
|
||||
ctsFreePascalCompilerInitialMacros,'','',da_Block);
|
||||
Result.AddChild(LastDefTempl.GetFirstSibling);
|
||||
Result.SetFlags([dtfAutoGenerated],[],false);
|
||||
//DebugLn('TDefinePool.CreateFPCTemplate FPC defines done');
|
||||
end;
|
||||
except
|
||||
on E: Exception do begin
|
||||
@ -2938,7 +2944,7 @@ var
|
||||
ANode:=UnitTree.Root;
|
||||
while ANode<>nil do begin
|
||||
Result:=TUnitNameLink(ANode.Data);
|
||||
cmp:=AnsiCompareText(AnUnitName,Result.UnitName);
|
||||
cmp:=CompareText(AnUnitName,Result.UnitName);
|
||||
if cmp<0 then
|
||||
ANode:=ANode.Left
|
||||
else if cmp>0 then
|
||||
|
@ -995,7 +995,7 @@ uses
|
||||
{$ENDIF}
|
||||
{$IFNDEF SYN_LAZARUS}
|
||||
// ToDo ShellAPI
|
||||
ShellAPI, SynEditStrConst
|
||||
ShellAPI, SynEditStrConst,
|
||||
{$ENDIF}
|
||||
Clipbrd;
|
||||
|
||||
|
@ -72,17 +72,17 @@ implementation
|
||||
|
||||
{ TCompiler }
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
{ TCompiler Constructor }
|
||||
{------------------------------------------------------------------------------}
|
||||
{------------------------------------------------------------------------------
|
||||
TCompiler Constructor
|
||||
------------------------------------------------------------------------------}
|
||||
constructor TCompiler.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
{ TCompiler Destructor }
|
||||
{------------------------------------------------------------------------------}
|
||||
{------------------------------------------------------------------------------
|
||||
TCompiler Destructor
|
||||
------------------------------------------------------------------------------}
|
||||
destructor TCompiler.Destroy;
|
||||
begin
|
||||
FreeAndNil(FTheProcess);
|
||||
|
@ -378,6 +378,8 @@ resourcestring
|
||||
lisTheFileWasNotFoundIgnoreWillGoOnLoadingTheProject = 'The file %s%s%s%'
|
||||
+'swas not found.%sIgnore will go on loading the project,%sAbort will '
|
||||
+'stop the loading.';
|
||||
lisSkipFileAndContinueLoading = 'Skip file and continue loading';
|
||||
lisAbortLoadingProject = 'Abort loading project';
|
||||
lisFileNotFound2 = 'File %s%s%s not found.%s';
|
||||
lisFileNotFoundDoYouWantToCreateIt = 'File %s%s%s not found.%sDo you want '
|
||||
+'to create it?%s';
|
||||
|
@ -4308,10 +4308,12 @@ var
|
||||
begin
|
||||
if ofProjectLoading in Flags then begin
|
||||
// this is a file, that was loaded last time, but was removed from disk
|
||||
Result:=MessageDlg(lisFileNotFound,
|
||||
Result:=QuestionDlg(lisFileNotFound,
|
||||
Format(lisTheFileWasNotFoundIgnoreWillGoOnLoadingTheProject, ['"',
|
||||
AFilename, '"', #13, #13, #13]),
|
||||
mtError, [mbIgnore, mbAbort], 0);
|
||||
mtError, [mrIgnore, lisSkipFileAndContinueLoading,
|
||||
mrAbort, lisAbortLoadingProject],
|
||||
0);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
@ -79,12 +79,13 @@ fi
|
||||
if [ $BuildCrossFPC = "yes" ]; then
|
||||
Params="$Params buildcrossfpc"
|
||||
fi
|
||||
if [ ! -z $Params ]; then
|
||||
if [ "x$Params" == "x" ]; then
|
||||
Params="$Params targets=i386-win32"
|
||||
echo "calling update_cross_fpc.sh $Params ..."
|
||||
./update_cross_fpc.sh $Params
|
||||
fi
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# build fpc_crosswin32 rpm
|
||||
if [ $BuildCrossWin32RPM = "yes" ]; then
|
||||
|
@ -107,7 +107,7 @@ if [ $InstallAsDefault = "yes" ]; then
|
||||
echo "Either prepend it to \$PATH or define another with installbin=<path>"
|
||||
exit -1
|
||||
fi
|
||||
# check if $InstallBin is in before the system compiler
|
||||
# check if $InstallBin is in PATH before the system compiler
|
||||
mkdir -p $InstallBin
|
||||
NewCompilerName=$InstallBin/$CompilerName
|
||||
if [ ! -f $NewCompilerName ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user