synautil.pas - improved DelphiXE+ compatibility. (jedi.inc introduced)
git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@164 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
		
							
								
								
									
										30
									
								
								kylix.inc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								kylix.inc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| // | ||||
| // This is FPC-incompatible code and was excluded from jedi.inc for this reason | ||||
| // | ||||
| // Kylix 3/C++ for some reason evaluates CompilerVersion comparisons to False, | ||||
| // if the constant to compare with is a floating point value - weird. | ||||
| // The "+" sign prevents Kylix/Delphi from issueing a warning about comparing | ||||
| // signed and unsigned values. | ||||
| // | ||||
|     {$IF not Declared(CompilerVersion)} | ||||
|       {$DEFINE KYLIX1} | ||||
|       {$DEFINE COMPILER6} | ||||
|       {$DEFINE DELPHICOMPILER6} | ||||
|       {$DEFINE RTL140_UP} | ||||
|     {$ELSEIF Declared(CompilerVersion) and (CompilerVersion > +14)} | ||||
|       {$DEFINE KYLIX2} | ||||
|       {$DEFINE COMPILER6} | ||||
|       {$DEFINE DELPHICOMPILER6} | ||||
|       {$DEFINE RTL142_UP} | ||||
|     {$ELSEIF Declared(CompilerVersion) and (CompilerVersion < +15)} | ||||
|       {$DEFINE KYLIX3} | ||||
|       {$DEFINE COMPILER6} | ||||
|       {$IFNDEF BCB} | ||||
|         {$DEFINE DELPHICOMPILER6} | ||||
|       {$ENDIF} | ||||
|       {$DEFINE RTL145_UP} | ||||
|     {$ELSE} | ||||
|       Add new Kylix version | ||||
|     {$IFEND} | ||||
|  | ||||
|  | ||||
							
								
								
									
										20
									
								
								synautil.pas
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								synautil.pas
									
									
									
									
									
								
							| @@ -1,5 +1,5 @@ | ||||
| {==============================================================================| | ||||
| | Project : Ararat Synapse                                       | 004.015.001 | | ||||
| | Project : Ararat Synapse                                       | 004.015.002 | | ||||
| |==============================================================================| | ||||
| | Content: support procedures and functions                                    | | ||||
| |==============================================================================| | ||||
| @@ -47,20 +47,12 @@ | ||||
|  | ||||
| {:@abstract(Support procedures and functions)} | ||||
|  | ||||
| {$IFDEF FPC} | ||||
|   {$MODE DELPHI} | ||||
| {$ENDIF} | ||||
| {$I jedi.inc} // load common compiler defines | ||||
|  | ||||
| {$Q-} | ||||
| {$R-} | ||||
| {$H+} | ||||
|  | ||||
| //old Delphi does not have MSWINDOWS define. | ||||
| {$IFDEF WIN32} | ||||
|   {$IFNDEF MSWINDOWS} | ||||
|     {$DEFINE MSWINDOWS} | ||||
|   {$ENDIF} | ||||
| {$ENDIF} | ||||
|  | ||||
| {$IFDEF UNICODE} | ||||
|   {$WARN IMPLICIT_STRING_CAST OFF} | ||||
|   {$WARN IMPLICIT_STRING_CAST_LOSS OFF} | ||||
| @@ -610,7 +602,7 @@ begin | ||||
|   x := rpos(':', Value); | ||||
|   if (x > 0) and ((Length(Value) - x) > 2) then | ||||
|     Value := Copy(Value, 1, x + 2); | ||||
|   Value := ReplaceString(Value, ':', TimeSeparator); | ||||
|   Value := ReplaceString(Value, ':', {$IFDEF DELPHIXE_UP}FormatSettings.{$ENDIF}TimeSeparator); | ||||
|   Result := -1; | ||||
|   try | ||||
|     Result := StrToTime(Value); | ||||
| @@ -2063,7 +2055,7 @@ var | ||||
| begin | ||||
|   for n :=  1 to 12 do | ||||
|   begin | ||||
|     CustomMonthNames[n] := ShortMonthNames[n]; | ||||
|     MyMonthNames[0, n] := ShortMonthNames[n]; | ||||
|     CustomMonthNames[n] := {$IFDEF DELPHIXE_UP}FormatSettings.{$ENDIF}ShortMonthNames[n]; | ||||
|     MyMonthNames[0, n] := {$IFDEF DELPHIXE_UP}FormatSettings.{$ENDIF}ShortMonthNames[n]; | ||||
|   end; | ||||
| end. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user