mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 01:20:38 +01:00
IDE: Remove UTF8CompareLatinTextFast calls.
This commit is contained in:
parent
c285b58aa3
commit
99de97a21c
@ -100,8 +100,8 @@ var
|
||||
begin
|
||||
if BuildModes=nil then exit;
|
||||
for i:=0 to BuildModes.Count-1 do
|
||||
if UTF8CompareLatinTextFast(BuildModes[i].GetCaption,ModeComboBox.Text)=0
|
||||
then begin
|
||||
if AnsiCompareText(BuildModes[i].GetCaption,ModeComboBox.Text)=0 then
|
||||
begin
|
||||
fBaseMode:=BuildModes[i];
|
||||
FillDiffTreeView;
|
||||
break;
|
||||
|
||||
@ -33,7 +33,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, Contnrs, System.UITypes,
|
||||
// LazUtils
|
||||
Laz2_XMLCfg, LazLoggerBase, LazFileUtils, LazUTF8,
|
||||
Laz2_XMLCfg, LazLoggerBase, LazFileUtils,
|
||||
// LCL
|
||||
Forms, Dialogs, ExtCtrls, StdCtrls, ComCtrls, ButtonPanel,
|
||||
InterfaceBase, LCLPlatformDef,
|
||||
@ -366,7 +366,7 @@ end;
|
||||
function TBuildLazarusProfiles.IndexByName(AName: string): integer;
|
||||
begin
|
||||
Result:=Count-1;
|
||||
while (Result>=0) and (UTF8CompareLatinTextFast(Items[Result].Name,AName)<>0) do
|
||||
while (Result>=0) and (AnsiCompareText(Items[Result].Name,AName)<>0) do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
Forms, Controls, Graphics, Dialogs,
|
||||
LazUTF8, LazLoggerBase,
|
||||
LazLoggerBase,
|
||||
BasicCodeTools, CodeToolManager,
|
||||
SynEditAutoComplete, SynPluginTemplateEdit, SynPluginSyncronizedEditBase, SynEdit, SynEditTypes,
|
||||
LazIDEIntf, SrcEditorIntf;
|
||||
@ -519,7 +519,7 @@ begin
|
||||
TokenStartX:=length(s)+1;
|
||||
j:=length(TemplateName);
|
||||
while (j>0)
|
||||
and (UTF8CompareLatinTextFast(copy(TemplateName,1,j),copy(s,TokenStartX-j,j))<>0) do
|
||||
and (AnsiCompareText(copy(TemplateName,1,j),copy(s,TokenStartX-j,j))<>0) do
|
||||
dec(j);
|
||||
dec(TokenStartX,j);
|
||||
AEditor.BlockBegin := Point(TokenStartX, p.y);
|
||||
|
||||
@ -3869,8 +3869,8 @@ end;
|
||||
function TEditOptLangList.FindByName(const Name: String): Integer;
|
||||
begin
|
||||
Result := Count - 1;
|
||||
while (Result > 0) and (UTF8CompareLatinTextFast(
|
||||
Items[Result].SynInstance.LanguageName, Name) <> 0) do
|
||||
while (Result > 0)
|
||||
and (AnsiCompareText(Items[Result].SynInstance.LanguageName, Name) <> 0) do
|
||||
dec(Result);
|
||||
if Result = 0 then // not found // not checking lshNone;
|
||||
dec(Result);
|
||||
|
||||
@ -39,7 +39,7 @@ uses
|
||||
// LCL
|
||||
Forms, Controls, Graphics, Dialogs, ExtCtrls, ButtonPanel,
|
||||
// LazUtils
|
||||
LazUTF8, LazTracer, LazStringUtils,
|
||||
LazTracer, LazStringUtils,
|
||||
// CodeTools
|
||||
BasicCodeTools, CodeToolManager, SourceChanger,
|
||||
// IDE
|
||||
@ -436,8 +436,8 @@ var
|
||||
begin
|
||||
i:=TypeRadiogroup.ItemIndex;
|
||||
for Result:=Low(TEncloseSelectionType) to High(TEncloseSelectionType) do
|
||||
if UTF8CompareLatinTextFast(TypeRadiogroup.Items[i],
|
||||
EncloseSelectionTypeDescription(Result))=0
|
||||
if AnsiCompareText(TypeRadiogroup.Items[i],
|
||||
EncloseSelectionTypeDescription(Result))=0
|
||||
then
|
||||
exit;
|
||||
RaiseGDBException('TEncloseSelectionDialog.GetEncloseType');
|
||||
|
||||
@ -176,8 +176,8 @@ procedure TEditorMouseOptionsAdvFrame.ActionGridCompareCells(Sender: TObject; AC
|
||||
Result := ord(TSynEditMouseAction(TStringGrid(Sender).Objects[0, BRow]).ClickDir)
|
||||
- ord(TSynEditMouseAction(TStringGrid(Sender).Objects[0, ARow]).ClickDir);
|
||||
else
|
||||
Result := UTF8CompareLatinTextFast(TStringGrid(Sender).Cells[i, ARow],
|
||||
TStringGrid(Sender).Cells[i, BRow]);
|
||||
Result := AnsiCompareText(TStringGrid(Sender).Cells[i, ARow],
|
||||
TStringGrid(Sender).Cells[i, BRow]);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ uses
|
||||
// LCL
|
||||
Dialogs,
|
||||
// LazUtils
|
||||
LazFileCache, LazFileUtils, LazLoggerBase, LazUTF8, AvgLvlTree, Laz2_XMLCfg,
|
||||
LazFileCache, LazFileUtils, LazLoggerBase, AvgLvlTree, Laz2_XMLCfg,
|
||||
LazConfigStorage,
|
||||
// IdeConfig
|
||||
DiffPatch, LazConf, RecentListProcs, IdeXmlConfigProcs,
|
||||
@ -800,7 +800,7 @@ end;
|
||||
function THistoryLists.IndexOfName(const Name: string): integer;
|
||||
begin
|
||||
Result:=Count-1;
|
||||
while (Result>=0) and (UTF8CompareLatinTextFast(Items[Result].Name,Name)<>0) do
|
||||
while (Result>=0) and (AnsiCompareText(Items[Result].Name,Name)<>0) do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
|
||||
@ -10275,7 +10275,7 @@ begin
|
||||
then begin
|
||||
STB := AppendPathDelim(GetTestBuildDirectory);
|
||||
FNStart := copy(NewSource.Filename, 1, length(STB));
|
||||
if UTF8CompareLatinTextFast(FNStart, STB) = 0 then
|
||||
if AnsiCompareText(FNStart, STB) = 0 then
|
||||
ActiveUnitInfo := Project1.UnitInfoWithFilename(
|
||||
copy(NewSource.Filename, 1+length(STB), MaxInt),
|
||||
[pfsfOnlyVirtualFiles]);
|
||||
|
||||
@ -517,7 +517,7 @@ end;
|
||||
function TNewLazIDEItemCategories.IndexOf(const CategoryName: string): integer;
|
||||
begin
|
||||
Result := Count - 1;
|
||||
while (Result >= 0) and (UTF8CompareLatinTextFast(CategoryName, Items[Result].Name) <> 0) do
|
||||
while (Result >= 0) and (AnsiCompareText(CategoryName, Items[Result].Name) <> 0) do
|
||||
Dec(Result);
|
||||
end;
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, Laz2_XMLCfg,
|
||||
// LazUtils
|
||||
LazUTF8, LazFileUtils,
|
||||
LazFileUtils,
|
||||
// IdeConfig
|
||||
IdeXmlConfigProcs;
|
||||
|
||||
@ -62,7 +62,7 @@ end;
|
||||
function CompareRecentListItem(s1, s2: string; ListType: TRecentListType): boolean;
|
||||
begin
|
||||
case ListType of
|
||||
rltCaseInsensitive: Result:=UTF8CompareLatinTextFast(s1,s2)=0;
|
||||
rltCaseInsensitive: Result:=AnsiCompareText(s1,s2)=0;
|
||||
rltFile: Result:=CompareFilenames(ChompPathDelim(s1),ChompPathDelim(s2))=0;
|
||||
else Result:=s1=s2;
|
||||
end;
|
||||
|
||||
@ -230,7 +230,7 @@ begin
|
||||
m:=0;
|
||||
while l<=r do begin
|
||||
m:=(l+r) shr 1;
|
||||
cmp:=UTF8CompareLatinTextFast(NewMacro.Name,Items[m].Name);
|
||||
cmp:=AnsiCompareText(NewMacro.Name,Items[m].Name);
|
||||
if cmp<0 then
|
||||
r:=m-1
|
||||
else if cmp>0 then
|
||||
@ -238,7 +238,7 @@ begin
|
||||
else
|
||||
break;
|
||||
end;
|
||||
if (m<fItems.Count) and (UTF8CompareLatinTextFast(NewMacro.Name,Items[m].Name)>0) then
|
||||
if (m<fItems.Count) and (AnsiCompareText(NewMacro.Name,Items[m].Name)>0) then
|
||||
inc(m);
|
||||
fItems.Insert(m,NewMacro);
|
||||
//if NewMacro.MacroFunction<>nil then
|
||||
@ -417,7 +417,7 @@ begin
|
||||
while l<=r do begin
|
||||
m:=(l+r) shr 1;
|
||||
Result:=Items[m];
|
||||
cmp:=UTF8CompareLatinTextFast(MacroName,Result.Name);
|
||||
cmp:=AnsiCompareText(MacroName,Result.Name);
|
||||
if cmp<0 then
|
||||
r:=m-1
|
||||
else if cmp>0 then
|
||||
|
||||
@ -5,8 +5,16 @@ unit WatchInspectToolbar;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, ComCtrls, Buttons, StdCtrls, ExtCtrls,
|
||||
Menus, LCLType, EditBtn, SpinEx, IDEImagesIntf, LazUTF8, LazClasses,
|
||||
Classes, SysUtils,
|
||||
// LCL
|
||||
Forms, Controls, ComCtrls, Buttons, StdCtrls, ExtCtrls, Menus, LCLType, EditBtn,
|
||||
// LazUtils
|
||||
LazClasses,
|
||||
// LazControls
|
||||
SpinEx,
|
||||
// IdeIntf
|
||||
IDEImagesIntf,
|
||||
// Debugger
|
||||
LazDebuggerIntf, IdeDebuggerStringConstants, ArrayNavigationFrame,
|
||||
IdeDebuggerOpts, Debugger, IdeDebuggerBackendValueConv, IdeDebuggerBase;
|
||||
|
||||
@ -508,10 +516,10 @@ begin
|
||||
|
||||
if FHistoryList <> nil then begin
|
||||
if (FHistoryList.Count = 0) or
|
||||
(UTF8CompareLatinTextFast(FHistoryList[0], AnExpression) <> 0)
|
||||
(AnsiCompareText(FHistoryList[0], AnExpression) <> 0)
|
||||
then begin
|
||||
for i:=FHistoryList.Count-1 downto 0 do
|
||||
if UTF8CompareLatinTextFast(FHistoryList[i], AnExpression) = 0 then
|
||||
if AnsiCompareText(FHistoryList[i], AnExpression) = 0 then
|
||||
FHistoryList.Delete(i);
|
||||
|
||||
FHistoryList.Insert(0, AnExpression);
|
||||
|
||||
@ -38,7 +38,7 @@ uses
|
||||
// LCL
|
||||
Dialogs,
|
||||
// LazUtils
|
||||
LazFileCache, LazFileUtils, LazLoggerBase, LazUTF8, AvgLvlTree, Laz2_XMLCfg,
|
||||
LazFileCache, LazFileUtils, LazLoggerBase, AvgLvlTree, Laz2_XMLCfg,
|
||||
LazConfigStorage,
|
||||
// IdeConfig
|
||||
DiffPatch, LazConf, RecentListProcs, IdeXmlConfigProcs,
|
||||
@ -797,7 +797,7 @@ end;
|
||||
function THistoryLists.IndexOfName(const Name: string): integer;
|
||||
begin
|
||||
Result:=Count-1;
|
||||
while (Result>=0) and (UTF8CompareLatinTextFast(Items[Result].Name,Name)<>0) do
|
||||
while (Result>=0) and (AnsiCompareText(Items[Result].Name,Name)<>0) do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ uses
|
||||
// Codetools
|
||||
FileProcs,
|
||||
// LazUtils
|
||||
LazFileUtils, LazUTF8, Laz2_XMLCfg,
|
||||
LazFileUtils, Laz2_XMLCfg,
|
||||
// BuildIntf
|
||||
ProjectIntf, PublishModuleIntf;
|
||||
|
||||
@ -951,7 +951,7 @@ end;
|
||||
function TLazProjectFileDescriptors.IndexOf(const Name: string): integer;
|
||||
begin
|
||||
Result:=Count-1;
|
||||
while (Result>=0) and (UTF8CompareLatinTextFast(Name,Items[Result].Name)<>0) do
|
||||
while (Result>=0) and (AnsiCompareText(Name,Items[Result].Name)<>0) do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
@ -1075,7 +1075,7 @@ end;
|
||||
function TLazProjectDescriptors.IndexOf(const Name: string): integer;
|
||||
begin
|
||||
Result:=Count-1;
|
||||
while (Result>=0) and (UTF8CompareLatinTextFast(Name,Items[Result].Name)<>0) do
|
||||
while (Result>=0) and (AnsiCompareText(Name,Items[Result].Name)<>0) do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
|
||||
@ -2850,7 +2850,7 @@ begin
|
||||
while (x<=length(s)) and (s[x]<>#3) do inc(x);
|
||||
if x<length(s) then begin
|
||||
inc(x,2);
|
||||
if UTF8CompareLatinTextFast(CurStr,copy(s,x,length(CurStr)))=0 then begin
|
||||
if AnsiCompareText(CurStr,copy(s,x,length(CurStr)))=0 then begin
|
||||
APosition:=i;
|
||||
break;
|
||||
end;
|
||||
@ -5106,7 +5106,7 @@ begin
|
||||
else
|
||||
SrcToken:=copy(Line,length(Line)-length(AToken)+1,length(AToken));
|
||||
//DebugLn(['TSourceEditor.AutoCompleteChar ',AToken,' SrcToken=',SrcToken,' CatName=',CatName,' Index=',Manager.CodeTemplateModul.CompletionAttributes[i].IndexOfName(CatName)]);
|
||||
if (UTF8CompareLatinTextFast(AToken,SrcToken)=0)
|
||||
if (AnsiCompareText(AToken,SrcToken)=0)
|
||||
and (Manager.CodeTemplateModul.CompletionAttributes[i].IndexOfName(CatName)>=0)
|
||||
and ( (not FEditor.SelAvail) or
|
||||
(Manager.CodeTemplateModul.CompletionAttributes[i].IndexOfName(
|
||||
|
||||
@ -2173,7 +2173,7 @@ var
|
||||
continue;
|
||||
ShortFilename:=ExtractFilename(NewFilename);
|
||||
CurName:=ExtractFileName(ConflictFile.Filename);
|
||||
if (UTF8CompareLatinTextFast(CurName,ShortFilename)<>0)
|
||||
if (AnsiCompareText(CurName,ShortFilename)<>0)
|
||||
and (CompareFilenames(CurName,ShortFilename)<>0) then
|
||||
continue;
|
||||
// name clash on this or other platforms => warn
|
||||
@ -6662,7 +6662,7 @@ end;
|
||||
function TLazPackageDescriptors.IndexOf(const Name: string): integer;
|
||||
begin
|
||||
Result:=Count-1;
|
||||
while (Result>=0) and (UTF8CompareLatinTextFast(Name,Items[Result].Name)<>0) do
|
||||
while (Result>=0) and (AnsiCompareText(Name,Items[Result].Name)<>0) do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user