From 66216cd1eb6d1a047fa72b6b2fdff3b284588bcb Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 18 Oct 2009 08:58:08 +0000 Subject: [PATCH] jcf2: update from the main repository to r823 git-svn-id: trunk@22217 - --- components/jcf2/CommandLine/Lazarus/JCF.lpr | 10 +- .../jcf2/IdePlugin/lazarus/jcfidelazarus.pas | 2 +- components/jcf2/Include/JcfGlobal.inc | 8 ++ components/jcf2/JcfGui/D11/jcfGui.bdsproj | 4 +- components/jcf2/JcfGui/D12/jcfGui.bdsproj | 4 +- components/jcf2/JcfVersionConsts.pas | 2 +- .../jcf2/Notepad/D11/JcfNotepad.bdsproj | 4 +- .../jcf2/Notepad/D12/JcfNotepad.bdsproj | 4 +- components/jcf2/Parse/BuildParseTree.pas | 7 +- components/jcf2/Parse/BuildTokenList.pas | 10 +- .../PreProcessor/PreProcessorParseTree.pas | 10 +- components/jcf2/Process/AllProcesses.pas | 4 +- components/jcf2/ReadWrite/ConvertTypes.pas | 1 + components/jcf2/ReadWrite/Converter.pas | 108 +++++++++--------- components/jcf2/ReadWrite/FileConverter.pas | 13 ++- components/jcf2/Utils/JcfStringUtils.pas | 8 +- components/jcf2/Utils/JcfSystemUtils.pas | 2 +- components/jcf2/readme.txt | 2 +- 18 files changed, 121 insertions(+), 82 deletions(-) diff --git a/components/jcf2/CommandLine/Lazarus/JCF.lpr b/components/jcf2/CommandLine/Lazarus/JCF.lpr index 407d7bd0ce..3bcd427bad 100644 --- a/components/jcf2/CommandLine/Lazarus/JCF.lpr +++ b/components/jcf2/CommandLine/Lazarus/JCF.lpr @@ -36,7 +36,7 @@ uses SysUtils, FileCtrl, JcfStringUtils in '..\..\Utils\JcfStringUtils.pas', - JcfFileUtils in '..\..\Utils\JcfFileUtils.pas', + //JcfFileUtils in '..\..\Utils\JcfFileUtils.pas', JcfSystemUtils in '..\..\Utils\JcfSystemUtils.pas', Converter in '..\..\ReadWrite\Converter.pas', FileConverter in '..\..\ReadWrite\FileConverter.pas', @@ -55,8 +55,8 @@ uses JcfLog in '..\..\Utils\JcfLog.pas', fShowParseTree in '..\..\Parse\UI\fShowParseTree.pas' {frmShowParseTree}, SetUses in '..\..\Settings\SetUses.pas', - JCFSetBase in '..\..\Settings\JCFSetBase.pas', - JCFSettings in '..\..\Settings\JCFSettings.pas', + JcfSetBase in '..\..\Settings\JcfSetBase.pas', + JcfSettings in '..\..\Settings\JcfSettings.pas', SetAlign in '..\..\Settings\SetAlign.pas', SetCaps in '..\..\Settings\SetCaps.pas', SetClarify in '..\..\Settings\SetClarify.pas', @@ -126,7 +126,7 @@ uses PreProcessorExpressionTokens in '..\..\Parse\PreProcessor\PreProcessorExpressionTokens.pas', PreProcessorExpressionParser in '..\..\Parse\PreProcessor\PreProcessorExpressionParser.pas', PreProcessorExpressionTokenise in '..\..\Parse\PreProcessor\PreProcessorExpressionTokenise.pas', - JCFHelp in '..\..\Utils\JCFHelp.pas', + JcfHelp in '..\..\Utils\JcfHelp.pas', SettingsTypes in '..\..\Settings\SettingsTypes.pas', SetPreProcessor in '..\..\Settings\SetPreProcessor.pas', UnitNameCaps in '..\..\Process\Capitalisation\UnitNameCaps.pas', @@ -215,7 +215,7 @@ var { look for something that is not a -/\ param } lsOpt := ParamStr(liLoop); - if (StrLeft(lsOpt, 1) <> '-') and (StrLeft(lsOpt, 1) <> '/') and + if (StrLeft(lsOpt, 1) <> '-') and {$IFNDEF UNIX} (StrLeft(lsOpt, 1) <> '/') and {$ENDIF} (StrLeft(lsOpt, 1) <> '\') and (StrLeft(lsOpt, 1) <> '?') then begin // must be a path diff --git a/components/jcf2/IdePlugin/lazarus/jcfidelazarus.pas b/components/jcf2/IdePlugin/lazarus/jcfidelazarus.pas index 2f74b64fe6..92f2e140a2 100644 --- a/components/jcf2/IdePlugin/lazarus/jcfidelazarus.pas +++ b/components/jcf2/IdePlugin/lazarus/jcfidelazarus.pas @@ -32,7 +32,7 @@ uses JcfRegistrySettings, JCFSetBase, JCFSettings, SetAlign, SetAsm, SetCaps, SetClarify, SetComments, SetIndent, SetObfuscate, SetPreProcessor, SetReplace, SetReturns, SetSpaces, SettingsTypes, SetTransform, SetUses, - SetWordList, SettingsStream, fJcfErrorDisplay, Delay, FileUtils, IntList, + SetWordList, SettingsStream, fJcfErrorDisplay, Delay, fileutils, IntList, JcfFontSetFunctions, JCFHelp, JcfLog, JcfMiscFunctions, fAbout, JcfVersionConsts, LazarusPackageIntf; diff --git a/components/jcf2/Include/JcfGlobal.inc b/components/jcf2/Include/JcfGlobal.inc index 0338a993bf..a522fbf569 100644 --- a/components/jcf2/Include/JcfGlobal.inc +++ b/components/jcf2/Include/JcfGlobal.inc @@ -7,6 +7,14 @@ // define the appropriate DelphiXX constants + {$IFDEF VER210} + {$IFDEF BCB} + {$DEFINE BCB14} + {$ELSE} + {$DEFINE DELPHI14} + {$ENDIF} + {$ENDIF} + {$IFDEF VER200} {$IFDEF BCB} {$DEFINE BCB12} diff --git a/components/jcf2/JcfGui/D11/jcfGui.bdsproj b/components/jcf2/JcfGui/D11/jcfGui.bdsproj index ee756d2465..a0c1d40b96 100644 --- a/components/jcf2/JcfGui/D11/jcfGui.bdsproj +++ b/components/jcf2/JcfGui/D11/jcfGui.bdsproj @@ -162,13 +162,13 @@ JEDI Code Format - 2.43.0.0 + 2.44.0.0 - 2.43 + 2.44 diff --git a/components/jcf2/JcfGui/D12/jcfGui.bdsproj b/components/jcf2/JcfGui/D12/jcfGui.bdsproj index d7f126c2a4..36af8320f9 100644 --- a/components/jcf2/JcfGui/D12/jcfGui.bdsproj +++ b/components/jcf2/JcfGui/D12/jcfGui.bdsproj @@ -162,13 +162,13 @@ JEDI Code Format - 2.43.0.0 + 2.44.0.0 - 2.43 + 2.44 diff --git a/components/jcf2/JcfVersionConsts.pas b/components/jcf2/JcfVersionConsts.pas index cf538e7c4c..40e0fc3478 100644 --- a/components/jcf2/JcfVersionConsts.pas +++ b/components/jcf2/JcfVersionConsts.pas @@ -31,7 +31,7 @@ interface const PROGRAM_VERSION = '2.44'; - PROGRAM_DATE = 'March 2009'; + PROGRAM_DATE = 'August 2009'; PROGRAM_HOME_PAGE = 'http://jedicodeformat.sourceforge.net/'; PROGRAM_SOURCEFORGE_HOME_PAGE = 'http://sourceforge.net/projects/jedicodeformat/'; PROGRAM_SVN_TRUNK = 'http://jedicodeformat.svn.sourceforge.net/svnroot/jedicodeformat/trunk/CodeFormat/Jcf2/'; diff --git a/components/jcf2/Notepad/D11/JcfNotepad.bdsproj b/components/jcf2/Notepad/D11/JcfNotepad.bdsproj index 95b3889cfd..0993d2b8ce 100644 --- a/components/jcf2/Notepad/D11/JcfNotepad.bdsproj +++ b/components/jcf2/Notepad/D11/JcfNotepad.bdsproj @@ -162,13 +162,13 @@ JCF Notepad - 2.43.0.0 + 2.44.0.0 - 2.43 + 2.44 diff --git a/components/jcf2/Notepad/D12/JcfNotepad.bdsproj b/components/jcf2/Notepad/D12/JcfNotepad.bdsproj index f92ed172c0..befd600854 100644 --- a/components/jcf2/Notepad/D12/JcfNotepad.bdsproj +++ b/components/jcf2/Notepad/D12/JcfNotepad.bdsproj @@ -162,13 +162,13 @@ JCF Notepad - 2.43.0.0 + 2.44.0.0 - 2.43 + 2.44 diff --git a/components/jcf2/Parse/BuildParseTree.pas b/components/jcf2/Parse/BuildParseTree.pas index 020789bbbf..15af3ad33e 100644 --- a/components/jcf2/Parse/BuildParseTree.pas +++ b/components/jcf2/Parse/BuildParseTree.pas @@ -412,10 +412,13 @@ begin raise TEParseError.Create('Unexpected token, expected ' + DescribeTarget, lcCurrentToken); end; - + + Inc(fiTokenCount); + {$IFNDEF COMMAND_LINE} if (fiTokenCount mod UPDATE_INTERVAL) = 0 then - Application.ProcessMessages; + Application.ProcessMessages; + {$ENDIF} { add trailing white space fixes some problems, causes others diff --git a/components/jcf2/Parse/BuildTokenList.pas b/components/jcf2/Parse/BuildTokenList.pas index b9c50df53f..85cf439094 100644 --- a/components/jcf2/Parse/BuildTokenList.pas +++ b/components/jcf2/Parse/BuildTokenList.pas @@ -479,7 +479,7 @@ var begin Result := False; - if not (CharInSet(Current, [':', '+', '-', '*', '/'])) then + if not (CharInSet(Char(Current), [':', '+', '-', '*', '/'])) then exit; TwoChars := CurrentChars(2); @@ -760,11 +760,15 @@ const var lcList: TSourceTokenList; lcNew: TSourceToken; + {$IFNDEF COMMAND_LINE} liCounter: integer; + {$ENDIF} begin Assert(SourceCode <> ''); + {$IFNDEF COMMAND_LINE} liCounter := 0; + {$ENDIF} lcList := TSourceTokenList.Create; while not EndOfFile do @@ -772,9 +776,11 @@ begin lcNew := GetNextToken; lcList.Add(lcNew); + {$IFNDEF COMMAND_LINE} Inc(liCounter); if (liCounter mod UPDATE_INTERVAL) = 0 then - Application.ProcessMessages; + Application.ProcessMessages; + {$ENDIF} end; Result := lcList; diff --git a/components/jcf2/Parse/PreProcessor/PreProcessorParseTree.pas b/components/jcf2/Parse/PreProcessor/PreProcessorParseTree.pas index e442f2a4d6..4936877aca 100644 --- a/components/jcf2/Parse/PreProcessor/PreProcessorParseTree.pas +++ b/components/jcf2/Parse/PreProcessor/PreProcessorParseTree.pas @@ -179,13 +179,17 @@ end; procedure TPreProcessorParseTree.NextToken; +{$IFNDEF COMMAND_LINE} const - UPDATE_INTERVAL = 512; + UPDATE_INTERVAL = 512; +{$ENDIF} begin Inc(fiCurrentTokenIndex); - + + {$IFNDEF COMMAND_LINE} if (fiCurrentTokenIndex mod UPDATE_INTERVAL) = 0 then - Application.ProcessMessages; + Application.ProcessMessages; + {$ENDIF} end; function TPreProcessorParseTree.CurrentToken: TSourceToken; diff --git a/components/jcf2/Process/AllProcesses.pas b/components/jcf2/Process/AllProcesses.pas index 3c9f164daa..dd0975dc31 100644 --- a/components/jcf2/Process/AllProcesses.pas +++ b/components/jcf2/Process/AllProcesses.pas @@ -156,8 +156,10 @@ begin if lc.FinalSummary(lsMessage) then OnMessage('', lsMessage, mtFinalSummary, -1, -1); - + + {$IFNDEF COMMAND_LINE} Application.ProcessMessages; + {$ENDIF} { if the main process fired, do the follow set too } for liLoop := Low(pcFollowSet) to High(pcFollowSet) do diff --git a/components/jcf2/ReadWrite/ConvertTypes.pas b/components/jcf2/ReadWrite/ConvertTypes.pas index 4ff689d140..6b590bac47 100644 --- a/components/jcf2/ReadWrite/ConvertTypes.pas +++ b/components/jcf2/ReadWrite/ConvertTypes.pas @@ -72,6 +72,7 @@ const {$IFDEF DELPHI10} REG_ROOT_KEY = '\Software\Borland\BDS\4.0\Jedi\JCF'; {$ENDIF} {$IFDEF DELPHI11} REG_ROOT_KEY = '\Software\Borland\BDS\5.0\Jedi\JCF'; {$ENDIF} {$IFDEF DELPHI12} REG_ROOT_KEY = '\Software\CodeGear\BDS\6.0\Jedi\JCF'; {$ENDIF} + {$IFDEF DELPHI14} REG_ROOT_KEY = '\Software\CodeGear\BDS\7.0\Jedi\JCF'; {$ENDIF} const SOURCE_FILE_FILTERS = diff --git a/components/jcf2/ReadWrite/Converter.pas b/components/jcf2/ReadWrite/Converter.pas index 542e9760cc..5fbd18a900 100644 --- a/components/jcf2/ReadWrite/Converter.pas +++ b/components/jcf2/ReadWrite/Converter.pas @@ -48,23 +48,23 @@ type private { the strings for the in and out code } fsInputCode, fsOutputCode: WideString; - fsFileName: string; + fsFileName: String; { classes to lex and parse the source } - fcTokeniser: TBuildTokenList; + fcTokeniser: TBuildTokenList; fcBuildParseTree: TBuildParseTree; { used for testing - just run 1 process } fcSingleProcess: TTreeNodeVisitorType; { state } - fiTokenCount: integer; - fbConvertError: boolean; + fiTokenCount: Integer; + fbConvertError: Boolean; fOnStatusMessage: TStatusMessageProc; { false for commandline UI - don't put up a parse fail dialog This could be in batch file on a server } - fbGuiMessages: boolean; + fbGuiMessages: Boolean; function GetOnStatusMessage: TStatusMessageProc; procedure SetOnStatusMessage(const Value: TStatusMessageProc); @@ -72,9 +72,7 @@ type procedure SendExceptionMessage(const pe: Exception); { call this to report the current state of the proceedings } - procedure SendStatusMessage(const psUnit, psMessage: string; - const peMessageType: TStatusMessageType; - const piY, piX: integer); + procedure SendStatusMessage(const psUnit, psMessage: String; const peMessageType: TStatusMessageType; const piY, piX: Integer); function GetRoot: TParseTreeNode; @@ -87,24 +85,24 @@ type destructor Destroy; override; procedure Convert; - procedure ConvertPart(const piStartIndex, piEndIndex: integer); + procedure ConvertPart(const piStartIndex, piEndIndex: Integer); procedure ShowParseTree; procedure Clear; procedure CollectOutput(const pcRoot: TParseTreeNode); - property InputCode: WideString read fsInputCode write fsInputCode; - property OutputCode: WideString read fsOutputCode write fsOutputCode; - property FileName: string read fsFileName write fsFileName; + property InputCode: WideString Read fsInputCode Write fsInputCode; + property OutputCode: WideString Read fsOutputCode Write fsOutputCode; + property FileName: String Read fsFileName Write fsFileName; - property TokenCount: integer Read fiTokenCount; - property ConvertError: boolean Read fbConvertError; - property GuiMessages: boolean read fbGuiMessages write fbGuiMessages; + property TokenCount: Integer Read fiTokenCount; + property ConvertError: Boolean Read fbConvertError; + property GuiMessages: Boolean Read fbGuiMessages Write fbGuiMessages; property Root: TParseTreeNode Read GetRoot; - property OnStatusMessage: TStatusMessageProc read GetOnStatusMessage write SetOnStatusMessage; + property OnStatusMessage: TStatusMessageProc Read GetOnStatusMessage Write SetOnStatusMessage; property SingleProcess: TTreeNodeVisitorType Read fcSingleProcess Write fcSingleProcess; end; @@ -112,16 +110,16 @@ implementation uses { delphi } - Controls, Forms, + AllProcesses, Controls, Forms, { local } - JcfStringUtils, + fShowParseTree, JcfRegistrySettings, + JcfSettings, JcfStringUtils, JcfUnicode, - SourceTokenList, SourceToken, - fShowParseTree, JcfSettings, JcfRegistrySettings, - AllProcesses, ParseError, PreProcessorParseTree, - TreeWalker, VisitSetXY, VisitSetNesting; + ParseError, PreProcessorParseTree, + SourceToken, + SourceTokenList, TreeWalker, VisitSetNesting, VisitSetXY; -function StrInsert(const psSub, psMain: string; const piPos: integer): string; +function StrInsert(const psSub, psMain: String; const piPos: Integer): String; begin Result := StrLeft(psMain, piPos - 1) + psSub + StrRestOf(psMain, piPos); end; @@ -132,11 +130,11 @@ begin inherited; { owned objects } - fcTokeniser := TBuildTokenList.Create; + fcTokeniser := TBuildTokenList.Create; fcTokeniser.FileName := FileName; fcBuildParseTree := TBuildParseTree.Create; - fcSingleProcess := nil; - fbGuiMessages := True; // use Ui to show parse errors by default + fcSingleProcess := nil; + fbGuiMessages := True; // use Ui to show parse errors by default end; destructor TConverter.Destroy; @@ -149,27 +147,31 @@ end; procedure TConverter.Clear; begin - fsInputCode := ''; - fsOutputCode := ''; + fsInputCode := ''; + fsOutputCode := ''; fcSingleProcess := nil; end; procedure TConverter.Convert; var lcTokenList: TSourceTokenList; + {$IFNDEF COMMAND_LINE} leOldCursor: TCursor; + {$ENDIF} begin fbConvertError := False; + {$IFNDEF COMMAND_LINE} leOldCursor := Screen.Cursor; try { finally normal cursor } - + // this can take a long time for large files Screen.Cursor := crHourGlass; + {$ENDIF} // turn text into tokens fcTokeniser.SourceCode := InputCode; - fcTokeniser.FileName := FileName; + fcTokeniser.FileName := FileName; lcTokenList := fcTokeniser.BuildTokenList; try { finally free the list } @@ -181,7 +183,7 @@ begin if FormatSettings.PreProcessor.Enabled then RemoveConditionalCompilation(lcTokenList); - // make a parse tree from it + // make a parse tree from it fcBuildParseTree.TokenList := lcTokenList; fcBuildParseTree.BuildParseTree; @@ -211,7 +213,7 @@ begin lcTokenList.Free; end; - try + try if not fbConvertError then begin @@ -239,9 +241,11 @@ begin end; end; + {$IFNDEF COMMAND_LINE} finally Screen.Cursor := leOldCursor; end; + {$ENDIF} end; { this is what alters the code (in parse tree form) from source to output } @@ -261,7 +265,7 @@ end; procedure TConverter.ApplySingleProcess; var - lcProcess: TBaseTreeNodeVisitor; + lcProcess: TBaseTreeNodeVisitor; lcTreeWalker: TTreeWalker; begin lcTreeWalker := TTreeWalker.Create; @@ -304,7 +308,7 @@ end; procedure TConverter.CollectOutput(const pcRoot: TParseTreeNode); var - liLoop: integer; + liLoop: Integer; begin Assert(pcRoot <> nil); @@ -318,7 +322,7 @@ begin // recurse, write out all child nodes for liLoop := 0 to pcRoot.ChildNodeCount - 1 do begin - CollectOutput(pcRoot.ChildNodes[liLoop]) + CollectOutput(pcRoot.ChildNodes[liLoop]); end; end; end; @@ -335,13 +339,13 @@ end; procedure TConverter.SendExceptionMessage(const pe: Exception); var - lsMessage: string; - liX, liY: integer; - leParseError: TEParseError; - leMessageType: TStatusMessageType; + lsMessage: String; + liX, liY: Integer; + leParseError: TEParseError; + leMessageType: TStatusMessageType; begin lsMessage := 'Exception ' + pe.ClassName + - ' ' + pe.Message; + ' ' + pe.Message; if pe is TEParseError then begin @@ -361,9 +365,7 @@ begin SendStatusMessage('', lsMessage, leMessageType, liY, liX); end; -procedure TConverter.SendStatusMessage(const psUnit, psMessage: string; - const peMessageType: TStatusMessageType; - const piY, piX: integer); +procedure TConverter.SendStatusMessage(const psUnit, psMessage: String; const peMessageType: TStatusMessageType; const piY, piX: Integer); begin if Assigned(fOnStatusMessage) then fOnStatusMessage(psUnit, psMessage, peMessageType, piY, piX); @@ -375,13 +377,13 @@ begin fShowParseTree.ShowParseTree(fcBuildParseTree.Root); end; -procedure TConverter.ConvertPart(const piStartIndex, piEndIndex: integer); +procedure TConverter.ConvertPart(const piStartIndex, piEndIndex: Integer); const FORMAT_START = '{}'; - FORMAT_END = '{}'; + FORMAT_END = '{}'; var - liRealInputStart, liRealInputEnd: integer; - liOutputStart, liOutputEnd: integer; + liRealInputStart, liRealInputEnd: Integer; + liOutputStart, liOutputEnd: Integer; lsNewOutput: WideString; begin Assert(piStartIndex >= 0); @@ -390,17 +392,17 @@ begin { round to nearest end of line } liRealInputStart := piStartIndex; - liRealInputEnd := piEndIndex; + liRealInputEnd := piEndIndex; { get to the start of the line } - while (liRealInputStart > 1) and (not WideCharIsReturn(InputCode[liRealInputStart -1 ])) do - dec(liRealInputStart); + while (liRealInputStart > 1) and (not WideCharIsReturn(InputCode[liRealInputStart - 1])) do + Dec(liRealInputStart); { get to the start of the next line } while (liRealInputEnd < Length(InputCode)) and (not WideCharIsReturn(InputCode[liRealInputEnd])) do - inc(liRealInputEnd); + Inc(liRealInputEnd); while (liRealInputEnd < Length(InputCode)) and (WideCharIsReturn(InputCode[liRealInputEnd])) do - inc(liRealInputEnd); + Inc(liRealInputEnd); { put markers into the input } fsInputCode := StrInsert(FORMAT_END, fsInputCode, liRealInputEnd); @@ -411,7 +413,7 @@ begin { locate the markers in the output, and replace before and after } liOutputStart := Pos(WideString(FORMAT_START), fsOutputCode) + Length(FORMAT_START); - liOutputEnd := Pos(WideString(FORMAT_END), fsOutputCode); + liOutputEnd := Pos(WideString(FORMAT_END), fsOutputCode); { splice } diff --git a/components/jcf2/ReadWrite/FileConverter.pas b/components/jcf2/ReadWrite/FileConverter.pas index 368052a173..672faf067d 100644 --- a/components/jcf2/ReadWrite/FileConverter.pas +++ b/components/jcf2/ReadWrite/FileConverter.pas @@ -362,9 +362,11 @@ begin ProcessFile(lsDir + lsNames[liLoop]); if fbAbort then break; - + + {$IFNDEF COMMAND_LINE} // refresh the GUI Application.ProcessMessages; + {$ENDIF} end; { all subdirs } @@ -396,7 +398,11 @@ begin Assert(psFiles <> nil); { for all pas files in the dir } + {$IFDEF FPC} + lsSearch := psDir + AllFilesMask; + {$ELSE} lsSearch := psDir + '*.*'; + {$ENDIF} FillChar(rSearch, Sizeof(TSearchRec), 0); bDone := (FindFirst(lsSearch, 0, rSearch) <> 0); @@ -426,7 +432,12 @@ begin Assert(psDir <> ''); Assert(psFiles <> nil); + {$IFDEF FPC} + lsSearch := psDir + AllFilesMask; + {$ELSE} lsSearch := psDir + '*.*'; + {$ENDIF} + FillChar(rSearch, Sizeof(TSearchRec), 0); bDone := (FindFirst(lsSearch, faDirectory, rSearch) <> 0); diff --git a/components/jcf2/Utils/JcfStringUtils.pas b/components/jcf2/Utils/JcfStringUtils.pas index 16e78f1cbc..9ba5db7fd1 100644 --- a/components/jcf2/Utils/JcfStringUtils.pas +++ b/components/jcf2/Utils/JcfStringUtils.pas @@ -93,8 +93,10 @@ const {$IFNDEF DELPHI12} +{$IFNDEF DELPHI14} function CharInSet(const C: Char; const testSet: TSysCharSet): Boolean; {$ENDIF} +{$ENDIF} function CharIsControl(const C: Char): Boolean; function CharIsAlpha(const C: Char): Boolean; function CharIsAlphaNum(const C: Char): Boolean; @@ -164,17 +166,17 @@ uses Unix {$endif} {$ifdef fpc} - , LCLIntf, FileUtil + , LCLIntf, fileutil {$endif}; {$IFNDEF DELPHI12} - +{$IFNDEF DELPHI14} // define CharInSet for Delphi 2007 or earlier function CharInSet(const C: Char; const testSet: TSysCharSet): Boolean; begin Result := C in testSet; end; - +{$ENDIF} {$ENDIF} function CharIsAlpha(const C: Char): Boolean; diff --git a/components/jcf2/Utils/JcfSystemUtils.pas b/components/jcf2/Utils/JcfSystemUtils.pas index 89ccbd3c7c..e9e8fac5a8 100644 --- a/components/jcf2/Utils/JcfSystemUtils.pas +++ b/components/jcf2/Utils/JcfSystemUtils.pas @@ -67,7 +67,7 @@ uses Unix {$endif} {$ifdef fpc} - ,LCLIntf, FileUtil, Dialogs + ,LCLIntf, fileutil, Dialogs {$endif} ; diff --git a/components/jcf2/readme.txt b/components/jcf2/readme.txt index 5c62069cf8..112f151c46 100644 --- a/components/jcf2/readme.txt +++ b/components/jcf2/readme.txt @@ -1,3 +1,3 @@ -This directory contains a copy (sometimes modified) of r803 jcf2 svn tree: https://jedicodeformat.svn.sourceforge.net/svnroot/jedicodeformat/trunk/CodeFormat/Jcf2 +This directory contains a copy (sometimes modified) of r823 jcf2 svn tree: https://jedicodeformat.svn.sourceforge.net/svnroot/jedicodeformat/trunk/CodeFormat/Jcf2 Only command line utility works currently. \ No newline at end of file