SynrEdit: regex, clean up, issue

git-svn-id: trunk@42153 -
This commit is contained in:
martin 2013-07-20 11:18:42 +00:00
parent da3b0a3808
commit 9022e89a5d
2 changed files with 4 additions and 158 deletions
components/synedit

View File

@ -10,41 +10,9 @@
(* *)
(* Complete Boolean Evaluation compiler directive is turned off by including *)
(* this file. *)
(* The $ObjExportAll directive is turned on if compiling with C++Builder 3 or *)
(* higher. This is required for Delphi components built in Builder with *)
(* run-time packages. *)
(* *)
(* Here is a brief explanation of what each of the defines mean: *)
(* SYN_WIN32 : Compilation target is 32-bit Windows *)
(* SYN_COMPILER_2 : Delphi 2.0x or C++B 1.0x is the compiler. *)
(* SYN_COMPILER_2_UP : Delphi 2.0x or higher, or C++B 1.0x or higher is the*)
(* compiler. *)
(* SYN_COMPILER_3 : Delphi 3.0x or C++B 3.0x is the compiler. *)
(* SYN_COMPILER_3_UP : Delphi 3.0x or higher, or C++B 3.0x or higher is the*)
(* compiler. *)
(* SYN_COMPILER_4 : Delphi 4.0x or C++B 4.0x is the compiler. *)
(* SYN_COMPILER_4_UP : Delphi 4.0x or higher, or C++B 4.0x or higher is *)
(* the compiler. *)
(* SYN_COMPILER_5 : Delphi 5.0x or C++B 5.0x is the compiler. *)
(* SYN_COMPILER_5_UP : Delphi 5.0x or higher, or C++B 5.0x or higher is *)
(* the compiler. *)
(* SYN_CPPB : Any version of C++B is being used. *)
(* SYN_CPPB_1 : C++B v1.0x is being used. *)
(* SYN_CPPB_3 : C++B v3.0x is being used. *)
(* SYN_CPPB_3_UP : C++B v3.0x or higher is being used. *)
(* SYN_CPPB_4 : C++B v4.0x is being used. *)
(* SYN_CPPB_4_UP : C++B v4.0x or higher is being used. *)
(* SYN_CPPB_5 : C++B v5.0x is being used. *)
(* SYN_CPPB_5_UP : C++B v5.0x or higher is being used. *)
(* SYN_DELPHI : Any version of Delphi is being used. *)
(* SYN_DELPHI_2 : Delphi v2.0x is being used. *)
(* SYN_DELPHI_2_UP : Delphi v2.0x or higher is being used. *)
(* SYN_DELPHI_3 : Delphi v3.0x is being used. *)
(* SYN_DELPHI_3_UP : Delphi v3.0x or higher is being used. *)
(* SYN_DELPHI_4 : Delphi v4.0x is being used. *)
(* SYN_DELPHI_4_UP : Delphi v4.0x or higher is being used. *)
(* SYN_DELPHI_5 : Delphi v5.0x is being used. *)
(* SYN_DELPHI_5_UP : Delphi v5.0x or higher is being used. *)
(******************************************************************************)
{$IFDEF FPC}
@ -57,121 +25,6 @@
{$DEFINE SYN_WIN32}
{$ENDIF}
{$IFDEF VER130}
{$DEFINE SYN_COMPILER_5}
{$DEFINE SYN_DELPHI}
{$DEFINE SYN_DELPHI_5}
{$ENDIF}
{$IFDEF VER125}
{$DEFINE SYN_COMPILER_4}
{$DEFINE SYN_CPPB}
{$DEFINE SYN_CPPB_4}
{$ENDIF}
{$IFDEF VER120}
{$DEFINE SYN_COMPILER_4}
{$DEFINE SYN_DELPHI}
{$DEFINE SYN_DELPHI_4}
{$ENDIF}
{$IFDEF VER110}
{$DEFINE SYN_COMPILER_3}
{$DEFINE SYN_CPPB}
{$DEFINE SYN_CPPB_3}
{$ENDIF}
{$IFDEF VER100}
{$DEFINE SYN_COMPILER_3}
{$DEFINE SYN_DELPHI}
{$DEFINE SYN_DELPHI_3}
{$ENDIF}
{$IFDEF VER93}
{$DEFINE SYN_COMPILER_2} { C++B v1 compiler is really v2 }
{$DEFINE SYN_CPPB}
{$DEFINE SYN_CPPB_1}
{$ENDIF}
{$IFDEF VER90}
{$DEFINE SYN_COMPILER_2}
{$DEFINE SYN_DELPHI}
{$DEFINE SYN_DELPHI_2}
{$ENDIF}
{$IFDEF SYN_COMPILER_2}
{$DEFINE SYN_COMPILER_1_UP}
{$DEFINE SYN_COMPILER_2_UP}
{$ENDIF}
{$IFDEF SYN_COMPILER_3}
{$DEFINE SYN_COMPILER_1_UP}
{$DEFINE SYN_COMPILER_2_UP}
{$DEFINE SYN_COMPILER_3_UP}
{$ENDIF}
{$IFDEF SYN_COMPILER_4}
{$DEFINE SYN_COMPILER_1_UP}
{$DEFINE SYN_COMPILER_2_UP}
{$DEFINE SYN_COMPILER_3_UP}
{$DEFINE SYN_COMPILER_4_UP}
{$ENDIF}
{$IFDEF SYN_COMPILER_5}
{$DEFINE SYN_COMPILER_1_UP}
{$DEFINE SYN_COMPILER_2_UP}
{$DEFINE SYN_COMPILER_3_UP}
{$DEFINE SYN_COMPILER_4_UP}
{$DEFINE SYN_COMPILER_5_UP}
{$ENDIF}
{$IFDEF SYN_DELPHI_2}
{$DEFINE SYN_DELPHI_2_UP}
{$ENDIF}
{$IFDEF SYN_DELPHI_3}
{$DEFINE SYN_DELPHI_2_UP}
{$DEFINE SYN_DELPHI_3_UP}
{$ENDIF}
{$IFDEF SYN_DELPHI_4}
{$DEFINE SYN_DELPHI_2_UP}
{$DEFINE SYN_DELPHI_3_UP}
{$DEFINE SYN_DELPHI_4_UP}
{$ENDIF}
{$IFDEF SYN_DELPHI_5}
{$DEFINE SYN_DELPHI_2_UP}
{$DEFINE SYN_DELPHI_3_UP}
{$DEFINE SYN_DELPHI_4_UP}
{$DEFINE SYN_DELPHI_5_UP}
{$ENDIF}
{$IFDEF SYN_CPPB_3}
{$DEFINE SYN_CPPB_3_UP}
{$ENDIF}
{$IFDEF SYN_COMPILER_3_UP}
{$DEFINE SYN_NO_COM_CLEANUP}
{$ENDIF}
{$IFDEF SYN_CPPB_3_UP}
// C++Builder requires this if you use Delphi components in run-time packages.
{$ObjExportAll On}
{$ENDIF}
{$IFDEF FPC}
{$DEFINE SYN_COMPILER_1_UP}
{$DEFINE SYN_COMPILER_2_UP}
{$DEFINE SYN_COMPILER_3_UP}
{$DEFINE SYN_COMPILER_4_UP}
{$DEFINE SYN_DELPHI_2_UP}
{$DEFINE SYN_DELPHI_3_UP}
{$DEFINE SYN_DELPHI_4_UP}
{$DEFINE SYN_DELPHI_5_UP}
{$DEFINE SYN_LAZARUS}
{$ENDIF}
{------------------------------------------------------------------------------}
{ Common compiler defines }
{------------------------------------------------------------------------------}
@ -186,11 +39,7 @@
{------------------------------------------------------------------------------}
// support for multibyte character sets
{$IFDEF SYN_COMPILER_3_UP}
{$IFNDEF SYN_LAZARUS}
{$DEFINE SYN_MBCSSUPPORT}
{$ENDIF}
{$ENDIF}
{.$DEFINE SYN_MBCSSUPPORT}
// additional tests for debugging

View File

@ -50,9 +50,6 @@ interface
// ======== Define options for TRegExpr engine
{.$DEFINE UniCode} // Unicode support
{$DEFINE RegExpPCodeDump} // p-code dumping (see Dump method)
{$IFNDEF FPC} // the option is not supported in FreePascal
{$DEFINE reRealExceptionAddr} // exceptions will point to appropriate source line, not to Error procedure
{$ENDIF}
{$DEFINE ComplexBraces} // support braces in complex cases
{$IFNDEF UniCode} // the option applicable only for non-UniCode mode
{$IFNDEF FPC_REQUIRES_PROPER_ALIGNMENT} //sets have to be aligned
@ -552,7 +549,7 @@ type
end;
const
RegExprInvertCaseFunction : TRegExprInvertCaseFunction = {$IFDEF FPC} nil {$ELSE} TRegExpr.InvertCaseFunction{$ENDIF};
RegExprInvertCaseFunction : TRegExprInvertCaseFunction = nil; //or TRegExpr.InvertCaseFunction;
// defaul for InvertCase property
function ExecRegExpr (const ARegExpr, AInputStr : RegExprString) : boolean;
@ -1155,9 +1152,9 @@ class function TRegExpr.InvertCaseFunction (const Ch : REChar) : REChar;
else
{$ENDIF}
begin
Result := {$IFDEF FPC}AnsiUpperCase (Ch) [1]{$ELSE} {$IFDEF SYN_WIN32}REChar (CharUpper (PChar (Ch))){$ELSE}REChar (toupper (integer (Ch))){$ENDIF} {$ENDIF};
Result := AnsiUpperCase (Ch)[1];
if Result = Ch
then Result := {$IFDEF FPC}AnsiLowerCase (Ch) [1]{$ELSE} {$IFDEF SYN_WIN32}REChar (CharLower (PChar (Ch))){$ELSE}REChar(tolower (integer (Ch))){$ENDIF} {$ENDIF};
then Result := AnsiLowerCase (Ch)[1];
end;
end; { of function TRegExpr.InvertCaseFunction
--------------------------------------------------------------}