mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 21:38:27 +02:00
removed ifdef ver1 from Martin Smat
git-svn-id: trunk@7479 -
This commit is contained in:
parent
ca26b57cef
commit
1064272122
@ -21,9 +21,6 @@ uses
|
||||
CodeTree, CodeAtom, SourceChanger, CodeToolMemManager, CodeCache,
|
||||
KeywordFuncLists, SourceLog, ExprEval, DefineTemplates, FileProcs, CodeToolsStrConsts,
|
||||
MultiKeyWordListTool, ResourceCodeTool, CodeToolsStructs,
|
||||
{$IFDEF VER1_0}
|
||||
OldAvLTree,
|
||||
{$ENDIF}
|
||||
// fast xml units, changes not merged in current fpc
|
||||
Laz_DOM, Laz_XMLCfg, Laz_XMLRead, Laz_XMLWrite;
|
||||
|
||||
|
@ -39,7 +39,7 @@ uses
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, SourceLog, LinkScanner, FileProcs,
|
||||
{$IFNDEF VER1_0}Avl_Tree{$ELSE}OldAvLTree{$ENDIF}, Laz_XMLCfg;
|
||||
Avl_Tree, Laz_XMLCfg;
|
||||
|
||||
type
|
||||
TCodeCache = class;
|
||||
|
@ -79,7 +79,7 @@ uses
|
||||
Classes, SysUtils, FileProcs, CodeToolsStrConsts, CodeTree, CodeAtom,
|
||||
PascalParserTool, MethodJumpTool, FindDeclarationTool, KeywordFuncLists,
|
||||
CodeToolsStructs, BasicCodeTools, LinkScanner, SourceChanger,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF};
|
||||
AVL_Tree;
|
||||
|
||||
type
|
||||
TNewClassPart = (ncpPrivateProcs, ncpPrivateVars,
|
||||
|
@ -39,7 +39,7 @@ uses
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, CodeTree, CodeAtom, KeywordFuncLists, BasicCodeTools,
|
||||
LinkScanner, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, SourceChanger,
|
||||
LinkScanner, AVL_Tree, SourceChanger,
|
||||
CustomCodeTool, CodeToolsStructs, StdCodeTools;
|
||||
|
||||
type
|
||||
|
@ -43,7 +43,7 @@ uses
|
||||
Classes, SysUtils, FileProcs, BasicCodeTools, CodeToolsStrConsts,
|
||||
EventCodeTool, CodeTree, CodeAtom, SourceChanger, DefineTemplates, CodeCache,
|
||||
ExprEval, LinkScanner, KeywordFuncLists, TypInfo,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, LFMTrees,
|
||||
AVL_Tree, LFMTrees,
|
||||
CustomCodeTool, FindDeclarationTool, IdentCompletionTool, StdCodeTools,
|
||||
ResourceCodeTool, CodeToolsStructs, CodeTemplatesTool, ExtractProcTool;
|
||||
|
||||
|
@ -41,7 +41,7 @@ uses
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, FileProcs, CodeToolsStructs, BasicCodeTools,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, CodeToolMemManager;
|
||||
AVL_Tree, CodeToolMemManager;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -44,7 +44,7 @@ uses
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, FileProcs, CodeToolsStrConsts, CodeTree, CodeAtom,
|
||||
KeywordFuncLists, BasicCodeTools, LinkScanner, CodeCache,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF};
|
||||
AVL_Tree;
|
||||
|
||||
const
|
||||
CodeToolPhaseNone = 0;
|
||||
|
@ -55,7 +55,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, CodeToolsStrConsts, ExprEval,
|
||||
Laz_XMLCfg, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF},
|
||||
Laz_XMLCfg, AVL_Tree,
|
||||
Process, KeywordFuncLists, FileProcs;
|
||||
|
||||
const
|
||||
|
@ -44,7 +44,7 @@ uses
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, FileProcs, CodeToolsStrConsts, CodeTree, CodeAtom,
|
||||
PascalParserTool, CodeCompletionTool, KeywordFuncLists, BasicCodeTools,
|
||||
LinkScanner, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, TypInfo,
|
||||
LinkScanner, AVL_Tree, TypInfo,
|
||||
SourceChanger, FindDeclarationTool, ExtractProcTool;
|
||||
|
||||
type
|
||||
|
@ -44,7 +44,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, FileProcs, CodeToolsStrConsts, CodeTree, CodeAtom,
|
||||
PascalParserTool, CodeCompletionTool, KeywordFuncLists, BasicCodeTools,
|
||||
LinkScanner, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, SourceChanger,
|
||||
LinkScanner, AVL_Tree, SourceChanger,
|
||||
FindDeclarationTool;
|
||||
|
||||
type
|
||||
|
@ -35,7 +35,7 @@ uses
|
||||
{$IFDEF MEM_CHECK}
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF},
|
||||
Classes, SysUtils, AVL_Tree,
|
||||
CodeToolsStrConsts;
|
||||
|
||||
type
|
||||
@ -213,7 +213,7 @@ implementation
|
||||
// to get more detailed error messages consider the os
|
||||
{$IFNDEF win32}
|
||||
uses
|
||||
{$IFDEF Ver1_0} Linux {$ELSE} Unix,BaseUnix {$ENDIF};
|
||||
Unix,BaseUnix;
|
||||
{$ENDIF}
|
||||
|
||||
var
|
||||
@ -294,12 +294,8 @@ begin
|
||||
{$IFDEF win32}
|
||||
Result:=true;
|
||||
{$ELSE}
|
||||
{$IFDEF Ver1_0}
|
||||
Result:= Linux.Access(AFilename,Linux.X_OK);
|
||||
{$ELSE}
|
||||
Result:= BaseUnix.FpAccess(AFilename,BaseUnix.X_OK)=0;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure CheckIfFileIsExecutable(const AFilename: string);
|
||||
@ -313,21 +309,20 @@ begin
|
||||
raise Exception.CreateFmt(ctsFileDoesNotExists,[AFilename]);
|
||||
end;
|
||||
{$IFNDEF win32}
|
||||
if not{$IFDEF Ver1_0}Linux.Access{$ELSE}(BaseUnix.FpAccess{$ENDIF}(
|
||||
AFilename,{$IFDEF Ver1_0}Linux{$ELSE}BaseUnix{$ENDIF}.X_OK){$IFNDEF Ver1_0}=0){$ENDIF} then
|
||||
if not(BaseUnix.FpAccess(AFilename,BaseUnix.X_OK)=0) then
|
||||
begin
|
||||
AText:='"'+AFilename+'"';
|
||||
case {$ifdef ver1_0} LinuxError {$else} fpGetErrno {$endif} of
|
||||
{$IFDEF Ver1_0}sys_eacces{$ELSE}ESysEAcces{$ENDIF}:
|
||||
case fpGetErrno of
|
||||
ESysEAcces:
|
||||
AText:='read access denied for '+AText;
|
||||
{$IFDEF Ver1_0}sys_enoent{$ELSE}ESysENoEnt{$ENDIF}:
|
||||
ESysENoEnt:
|
||||
AText:='a directory component in '+AText
|
||||
+' does not exist or is a dangling symlink';
|
||||
{$IFDEF Ver1_0}sys_enotdir{$ELSE}ESysENotDir{$ENDIF}:
|
||||
ESysENotDir:
|
||||
AText:='a directory component in '+Atext+' is not a directory';
|
||||
{$IFDEF Ver1_0}sys_enomem{$ELSE}ESysENoMem{$ENDIF}:
|
||||
ESysENoMem:
|
||||
AText:='insufficient memory';
|
||||
{$IFDEF Ver1_0}sys_eloop{$ELSE}ESysELoop{$ENDIF}:
|
||||
ESysELoop:
|
||||
AText:=AText+' has a circular symbolic link';
|
||||
else
|
||||
AText:=Format(ctsFileIsNotExecutable,[AText]);
|
||||
@ -413,12 +408,8 @@ begin
|
||||
{$IFDEF win32}
|
||||
Result:=true;
|
||||
{$ELSE}
|
||||
{$IFDEF Ver1_0}
|
||||
Result:= Linux.Access(AFilename,Linux.R_OK);
|
||||
{$ELSE}
|
||||
Result:= BaseUnix.FpAccess(AFilename,BaseUnix.R_OK)=0;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function FileIsWritable(const AFilename: string): boolean;
|
||||
@ -426,12 +417,8 @@ begin
|
||||
{$IFDEF win32}
|
||||
Result:=((FileGetAttr(AFilename) and faReadOnly)=0);
|
||||
{$ELSE}
|
||||
{$IFDEF Ver1_0}
|
||||
Result:= Linux.Access(AFilename,Linux.W_OK);
|
||||
{$ELSE}
|
||||
Result:= BaseUnix.FpAccess(AFilename,BaseUnix.W_OK)=0;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function FileIsText(const AFilename: string): boolean;
|
||||
|
@ -38,7 +38,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileProcs, BasicCodeTools, CodeTree, LinkScanner,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, PascalParserTool,
|
||||
AVL_Tree, PascalParserTool,
|
||||
CodeToolMemManager;
|
||||
|
||||
type
|
||||
|
@ -83,7 +83,7 @@ uses
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, CodeToolsStrConsts, CodeTree, CodeAtom, CustomCodeTool,
|
||||
KeywordFuncLists, BasicCodeTools, LinkScanner, CodeCache,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, PascalParserTool,
|
||||
AVL_Tree, PascalParserTool,
|
||||
PascalReaderTool, FileProcs, DefineTemplates, FindDeclarationCache;
|
||||
|
||||
type
|
||||
|
@ -54,7 +54,7 @@ uses
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, FileProcs, CodeTree, CodeAtom, CustomCodeTool,
|
||||
KeywordFuncLists, BasicCodeTools, LinkScanner,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, CodeToolMemManager,
|
||||
AVL_Tree, CodeToolMemManager,
|
||||
SourceChanger, FindDeclarationTool, PascalParserTool;
|
||||
|
||||
|
||||
|
@ -73,16 +73,10 @@ type
|
||||
// -------------------------------------------------------
|
||||
// DOMString
|
||||
// -------------------------------------------------------
|
||||
|
||||
{$IFDEF ver1_0}
|
||||
DOMString = String;
|
||||
DOMPChar = PChar;
|
||||
{$ELSE}
|
||||
DOMString = String;
|
||||
DOMPChar = PChar;
|
||||
// DOMString = WideString;
|
||||
// DOMPChar = PWideChar;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
// -------------------------------------------------------
|
||||
|
@ -373,10 +373,8 @@ begin
|
||||
end;
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$IFNDEF VER1_0}
|
||||
// widestrings ansistring conversion is slow and we only use ansistring anyway
|
||||
{off $DEFINE UsesFPCWidestrings}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF UsesFPCWidestrings}
|
||||
|
@ -79,11 +79,7 @@ end;
|
||||
type
|
||||
TOutputProc = procedure(const Buffer; Count: Longint);
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
threadvar
|
||||
{$ELSE}
|
||||
var
|
||||
{$ENDIF}
|
||||
f: ^Text;
|
||||
stream: TStream;
|
||||
wrt, wrtln: TOutputProc;
|
||||
@ -150,11 +146,7 @@ end;
|
||||
// Indent handling
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
threadvar
|
||||
{$ELSE}
|
||||
var
|
||||
{$ENDIF}
|
||||
Indent: String;
|
||||
IndentCount: integer;
|
||||
|
||||
@ -431,10 +423,8 @@ end;
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$IFNDEF VER1_0}
|
||||
// widestrings ansistring conversion is slow and we only use ansistring anyway
|
||||
{off $DEFINE UsesFPCWidestrings}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF UsesFPCWidestrings}
|
||||
|
@ -42,7 +42,7 @@ uses
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, FileProcs, CodeTree, CodeAtom, PascalParserTool,
|
||||
StdCodeTools, CodeTemplatesTool, KeywordFuncLists, BasicCodeTools,
|
||||
LinkScanner, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF};
|
||||
LinkScanner, AVL_Tree;
|
||||
|
||||
|
||||
type
|
||||
|
@ -43,7 +43,7 @@ uses
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, FileProcs, CodeToolsStrConsts, CodeTree, CodeAtom,
|
||||
CustomCodeTool, MultiKeyWordListTool, KeywordFuncLists, BasicCodeTools,
|
||||
LinkScanner, CodeCache, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF};
|
||||
LinkScanner, CodeCache, AVL_Tree;
|
||||
|
||||
type
|
||||
TProcHeadAttribute = (
|
||||
|
@ -39,7 +39,7 @@ uses
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, FileProcs, CodeToolsStrConsts, CodeTree, CodeAtom,
|
||||
CustomCodeTool, PascalParserTool, KeywordFuncLists, BasicCodeTools,
|
||||
LinkScanner, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF};
|
||||
LinkScanner, AVL_Tree;
|
||||
|
||||
type
|
||||
TPascalReaderTool = class(TPascalParserTool)
|
||||
|
@ -43,7 +43,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileProcs, CodeToolsStrConsts, CodeCache, BasicCodeTools,
|
||||
LinkScanner, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF},
|
||||
LinkScanner, AVL_Tree,
|
||||
KeywordFuncLists;
|
||||
|
||||
type
|
||||
|
@ -51,7 +51,7 @@ uses
|
||||
Classes, SysUtils, CodeToolsStrConsts, FileProcs, CodeTree, CodeAtom,
|
||||
FindDeclarationTool, IdentCompletionTool, PascalReaderTool, PascalParserTool,
|
||||
KeywordFuncLists, BasicCodeTools, LinkScanner, CodeCache,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, LFMTrees, SourceChanger,
|
||||
AVL_Tree, LFMTrees, SourceChanger,
|
||||
CustomCodeTool, CodeToolsStructs;
|
||||
|
||||
type
|
||||
|
@ -23,9 +23,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
Buttons, ComCtrls, ActnList, Menus, Clipbrd, StdCtrls,
|
||||
{$IFNDEF VER1_9_8}
|
||||
testdecorator,
|
||||
{$ENDIF}
|
||||
testreport, fpcunit, testregistry;
|
||||
|
||||
type
|
||||
@ -252,11 +250,9 @@ begin
|
||||
node := TestTree.Items.AddChildObject(rootNode, ASuite.Test[i].TestName, ASuite.Test[i]);
|
||||
if ASuite.Test[i] is TTestSuite then
|
||||
BuildTree(Node, TTestSuite(ASuite.Test[i]))
|
||||
{$IFNDEF VER1_9_8}
|
||||
else
|
||||
if TObject(ASuite.Test[i]).InheritsFrom(TTestDecorator) then
|
||||
BuildTree(Node, TTestSuite(TTestDecorator(ASuite.Test[i]).Test))
|
||||
{$ENDIF};
|
||||
node.ImageIndex := 12;
|
||||
node.SelectedIndex := 12;
|
||||
end;
|
||||
@ -387,22 +383,14 @@ begin
|
||||
node.ImageIndex := 4;
|
||||
node.SelectedIndex := 4;
|
||||
if (AError.SourceUnitName <> '') and
|
||||
{$IFNDEF VER1_9_8}
|
||||
(AError.FailedMethodName <> '')
|
||||
{$ELSE}
|
||||
(AError.MethodName <> '')
|
||||
{$ENDIF}
|
||||
then
|
||||
then
|
||||
begin
|
||||
node := TestTree.Items.AddChild(ErrorNode, 'Unit name: ' + AError.SourceUnitName);
|
||||
node.ImageIndex := 11;
|
||||
node.SelectedIndex := 11;
|
||||
node := TestTree.Items.AddChild(ErrorNode, 'Method name: ' +
|
||||
{$IFNDEF VER1_9_8}
|
||||
AError.FailedMethodName);
|
||||
{$ELSE}
|
||||
AError.MethodName);
|
||||
{$ENDIF}
|
||||
node.ImageIndex := 11;
|
||||
node.SelectedIndex := 11;
|
||||
node := TestTree.Items.AddChild(ErrorNode, 'Line number: ' + IntToStr(AError.LineNumber));
|
||||
|
@ -21,7 +21,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, LCLType, LCLIntf,
|
||||
{$IFDEF VER1_0}Linux{$ELSE}Unix{$ENDIF},
|
||||
Unix,
|
||||
Forms, Controls, Graphics, LMessages, InterfaceBase, WSLCLClasses, WSControls,
|
||||
LResources, GTKInt, Gtk, NVGL,
|
||||
{$IFDEF UseGtkGlAreaLib}
|
||||
|
@ -31,12 +31,6 @@ uses
|
||||
X, XLib, XUtil, nvGL;
|
||||
|
||||
|
||||
{$IFDEF VER1_0}
|
||||
type
|
||||
PCardinal = ^Cardinal;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
const
|
||||
GLX_VERSION_1_1 = 1;
|
||||
GLX_VERSION_1_2 = 1;
|
||||
|
@ -30,8 +30,7 @@ implementation
|
||||
|
||||
procedure RegisterUnitInterbase;
|
||||
begin
|
||||
RegisterComponents('Interbase',[TIBDatabase,TIBTransaction
|
||||
{$IFNDEF VER1_0},TIBQuery{$ENDIF}]);
|
||||
RegisterComponents('Interbase',[TIBDatabase,TIBTransaction,TIBQuery]);
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
@ -205,12 +205,7 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses SysUtils, AppUtils,
|
||||
{$IFDEF VER1_9_8}
|
||||
RTLConst;
|
||||
{$ELSE}
|
||||
RTLConsts;
|
||||
{$ENDIF}
|
||||
uses SysUtils, AppUtils, RTLConsts;
|
||||
|
||||
const
|
||||
{ The following strings should not be localized }
|
||||
|
@ -145,11 +145,7 @@ Procedure Register;
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$IFDEF VER1_9_8}
|
||||
RTLConst;
|
||||
{$ELSE}
|
||||
RTLConsts;
|
||||
{$ENDIF}
|
||||
|
||||
Procedure Register;
|
||||
begin
|
||||
|
@ -22,7 +22,7 @@ unit registersqldb;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources,{$IFNDEF VER1_0} sqldb, ibconnection, pqconnection, mysql4conn, {$ENDIF} LazarusPackageIntf;
|
||||
Classes, SysUtils, LResources, sqldb, ibconnection, pqconnection, mysql4conn, LazarusPackageIntf;
|
||||
|
||||
procedure Register;
|
||||
|
||||
@ -30,13 +30,11 @@ implementation
|
||||
|
||||
procedure RegisterUnitSQLdb;
|
||||
begin
|
||||
{$IFNDEF VER1_0}
|
||||
RegisterComponents('SQLdb',[TSQLQuery,
|
||||
TSQLTransaction,
|
||||
TIBConnection,
|
||||
TPQConnection,
|
||||
TMySQLConnection]);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
@ -807,7 +807,7 @@ type
|
||||
// else ExecPos (MatchPos [0] + MatchLen [0]);
|
||||
// but it's more simpler !
|
||||
|
||||
function ExecPos (AOffset: integer {$IFDEF D4_}{$IFNDEF VER1_0}= 1{$ENDIF}{$ENDIF}) : boolean;
|
||||
function ExecPos (AOffset: integer {$IFDEF D4_}= 1{$ENDIF}) : boolean;
|
||||
// find match for InputString starting from AOffset position
|
||||
// (AOffset=1 - first char of InputString)
|
||||
|
||||
@ -834,7 +834,7 @@ type
|
||||
|
||||
function Replace (AInputStr : RegExprString;
|
||||
const AReplaceStr : RegExprString;
|
||||
AUseSubstitution : boolean{$IFDEF D4_}{$IFNDEF VER1_0}= False{$ENDIF}{$ENDIF}) //###0.946
|
||||
AUseSubstitution : boolean{$IFDEF D4_}= False{$ENDIF}) //###0.946
|
||||
: RegExprString;
|
||||
// Returns AInputStr with r.e. occurencies replaced by AReplaceStr
|
||||
// If AUseSubstitution is true, then AReplaceStr will be used
|
||||
@ -944,7 +944,7 @@ procedure SplitRegExpr (const ARegExpr, AInputStr : RegExprString; APieces : TSt
|
||||
// Split AInputStr into APieces by r.e. ARegExpr occurencies
|
||||
|
||||
function ReplaceRegExpr (const ARegExpr, AInputStr, AReplaceStr : RegExprString;
|
||||
AUseSubstitution : boolean{$IFDEF D4_}{$IFNDEF VER1_0}= False{$ENDIF}{$ENDIF}) : RegExprString; //###0.947
|
||||
AUseSubstitution : boolean{$IFDEF D4_}= False{$ENDIF}) : RegExprString; //###0.947
|
||||
// Returns AInputStr with r.e. occurencies replaced by AReplaceStr
|
||||
// If AUseSubstitution is true, then AReplaceStr will be used
|
||||
// as template for Substitution methods.
|
||||
@ -963,7 +963,7 @@ function QuoteRegExprMetaChars (const AStr : RegExprString) : RegExprString;
|
||||
// user input
|
||||
|
||||
function RegExprSubExpressions (const ARegExpr : string;
|
||||
ASubExprs : TStrings; AExtendedSyntax : boolean{$IFDEF D4_}{$IFNDEF VER1_0}= False{$ENDIF}{$ENDIF}) : integer;
|
||||
ASubExprs : TStrings; AExtendedSyntax : boolean{$IFDEF D4_}= False{$ENDIF}) : integer;
|
||||
// Makes list of subexpressions found in ARegExpr r.e.
|
||||
// In ASubExps every item represent subexpression,
|
||||
// from first to last, in format:
|
||||
@ -1116,7 +1116,7 @@ procedure SplitRegExpr (const ARegExpr, AInputStr : RegExprString; APieces : TSt
|
||||
--------------------------------------------------------------}
|
||||
|
||||
function ReplaceRegExpr (const ARegExpr, AInputStr, AReplaceStr : RegExprString;
|
||||
AUseSubstitution : boolean{$IFDEF D4_}{$IFNDEF VER1_0}= False{$ENDIF}{$ENDIF}) : RegExprString;
|
||||
AUseSubstitution : boolean{$IFDEF D4_}= False{$ENDIF}) : RegExprString;
|
||||
var r : TRegExpr;
|
||||
begin
|
||||
r := TRegExpr.Create;
|
||||
@ -1155,7 +1155,7 @@ function QuoteRegExprMetaChars (const AStr : RegExprString) : RegExprString;
|
||||
|
||||
function RegExprSubExpressions (const ARegExpr : string;
|
||||
ASubExprs : TStrings;
|
||||
AExtendedSyntax : boolean{$IFDEF D4_}{$IFNDEF VER1_0}= False{$ENDIF}{$ENDIF}) : integer;
|
||||
AExtendedSyntax : boolean{$IFDEF D4_}= False{$ENDIF}) : integer;
|
||||
type
|
||||
TStackItemRec = record //###0.945
|
||||
SubExprIdx : integer;
|
||||
@ -3846,7 +3846,7 @@ function TRegExpr.ExecNext : boolean;
|
||||
end; { of function TRegExpr.ExecNext
|
||||
--------------------------------------------------------------}
|
||||
|
||||
function TRegExpr.ExecPos (AOffset: integer {$IFDEF D4_}{$IFNDEF VER1_0}= 1{$ENDIF}{$ENDIF}) : boolean;
|
||||
function TRegExpr.ExecPos (AOffset: integer {$IFDEF D4_}= 1{$ENDIF}) : boolean;
|
||||
begin
|
||||
Result := ExecPrim (AOffset);
|
||||
end; { of function TRegExpr.ExecPos
|
||||
@ -4089,7 +4089,7 @@ procedure TRegExpr.Split (AInputStr : RegExprString; APieces : TStrings);
|
||||
--------------------------------------------------------------}
|
||||
|
||||
function TRegExpr.Replace (AInputStr : RegExprString; const AReplaceStr : RegExprString;
|
||||
AUseSubstitution : boolean{$IFDEF D4_}{$IFNDEF VER1_0}= False{$ENDIF}{$ENDIF}) : RegExprString;
|
||||
AUseSubstitution : boolean{$IFDEF D4_}= False{$ENDIF}) : RegExprString;
|
||||
var PrevPos : integer;
|
||||
begin
|
||||
Result := '';
|
||||
|
@ -3821,18 +3821,7 @@ function GetPropertyValue(PI: PPropInfo; const AObject: TObject): string;
|
||||
|
||||
function GetFloatProperty : string;
|
||||
const
|
||||
Precisions : array[TFloatType] of Integer =
|
||||
{$IFDEF IP_LAZARUS}
|
||||
{$IFDEF Ver1_0}
|
||||
// ftSingle,ftDouble,ftExtended,ftComp,ftCurr,ftFixed16,ftFixed32
|
||||
(7, 15, 18, 18, 19, 4, 8);
|
||||
{$ELSE}
|
||||
// ftSingle,ftDouble,ftExtended,ftComp,ftCurr
|
||||
(7, 15, 18, 18, 19);
|
||||
{$ENDIF}
|
||||
{$ELSE}
|
||||
(7, 15, 18, 18, 19);
|
||||
{$ENDIF}
|
||||
Precisions : array[TFloatType] of Integer = (7, 15, 18, 18, 19);
|
||||
begin
|
||||
Result := FloatToStrF(GetFloatProp(AObject, PI), ffGeneral,
|
||||
Precisions[GetTypeData(GetPropType)^.FloatType], 0);
|
||||
@ -3851,12 +3840,7 @@ function GetPropertyValue(PI: PPropInfo; const AObject: TObject): string;
|
||||
function GetVariantProperty : string;
|
||||
begin
|
||||
{$IFDEF FPC}
|
||||
{$IFDEF VER1_0}
|
||||
// 1.0.x does not support variants
|
||||
Result := '';
|
||||
{$ELSE}
|
||||
Result := AnsiString(GetVariantProp(AObject, PI));
|
||||
{$ENDIF}
|
||||
{$ELSE}
|
||||
Result := GetVariantProp(AObject, PI);
|
||||
{$ENDIF}
|
||||
|
@ -896,7 +896,7 @@ asm
|
||||
end;
|
||||
|
||||
function IpCharCount(const Buffer; BufSize : DWORD; C : AnsiChar) : DWORD;
|
||||
{$IFNDEF VER1_0 lazarus}register;{$ENDIF}
|
||||
register;
|
||||
asm
|
||||
push ebx
|
||||
xor ebx, ebx
|
||||
|
@ -81,11 +81,7 @@ uses
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
{$IFDEF UNIX}
|
||||
{$IFDEF Ver1_0}
|
||||
Linux,
|
||||
{$ELSE}
|
||||
Unix,BaseUnix,
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
SysUtils;
|
||||
|
||||
@ -108,14 +104,14 @@ begin
|
||||
if Count > 31 then Count := 31;
|
||||
|
||||
// zero the whole bit set of handles
|
||||
{$IFDEF Ver1_0}FD_ZERO{$ELSE}FpFD_ZERO{$ENDIF}(FDS);
|
||||
FpFD_ZERO(FDS);
|
||||
|
||||
// set bits for all waiting handles
|
||||
for n := 0 to Count do
|
||||
begin
|
||||
if Max < AHandles[n] then Max := AHandles[n];
|
||||
if AHandles[n] <> 0 then
|
||||
{$IFDEF Ver1_0}FD_Set{$ELSE}FpFD_Set{$ENDIF}(AHandles[n], FDS);
|
||||
FpFD_Set(AHandles[n], FDS);
|
||||
end;
|
||||
if Max=0 then begin
|
||||
// no valid handle, so no change possible
|
||||
@ -130,8 +126,7 @@ begin
|
||||
// Select:
|
||||
// R = -1 on error, 0 on timeout, >0 on success and is number of handles
|
||||
// FDSWait is changed, and indicates what descriptors have changed
|
||||
R := {$IFDEF Ver1_0}Select{$ELSE}FpSelect{$ENDIF}(Max + 1, @FDSWait,
|
||||
nil, nil, TimeOut);
|
||||
R := FpSelect(Max + 1, @FDSWait, nil, nil, TimeOut);
|
||||
Application.ProcessMessages;
|
||||
if Application.Terminated then Break;
|
||||
until R <> 0;
|
||||
@ -141,11 +136,7 @@ begin
|
||||
then begin
|
||||
for n := 0 to Count do
|
||||
if (AHandles[n] <> 0)
|
||||
and {$IFDEF Ver1_0}
|
||||
FD_ISSET(AHandles[n],FDSWait)
|
||||
{$ELSE}
|
||||
(FpFD_ISSET(AHandles[n],FDSWait)=1)
|
||||
{$ENDIF}
|
||||
and (FpFD_ISSET(AHandles[n],FDSWait)=1)
|
||||
then begin
|
||||
Result := Result or 1 shl n;
|
||||
Dec(R);
|
||||
|
@ -42,7 +42,7 @@ uses
|
||||
|
||||
type
|
||||
// datatype pointing to data on the target
|
||||
TDBGPtr = type {$IFNDEF VER1_0}QWord{$ELSE}DWord{$ENDIF};
|
||||
TDBGPtr = type QWord;
|
||||
|
||||
TDBGLocationRec = record
|
||||
Address: TDBGPtr;
|
||||
|
@ -43,11 +43,7 @@ uses
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
{$IFDEF UNIX}
|
||||
{$IFDEF Ver1_0}
|
||||
Linux,
|
||||
{$ELSE}
|
||||
Unix,BaseUnix,
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
BaseDebugManager;
|
||||
|
||||
@ -285,11 +281,7 @@ type
|
||||
{ Some win32 stuff }
|
||||
{ =========================================================================== }
|
||||
{$IFDEF WIN32}
|
||||
{$IFNDEF VER1_0}
|
||||
var
|
||||
{$ELSE}
|
||||
const
|
||||
{$ENDIF}
|
||||
DebugBreakAddr: Pointer = nil;
|
||||
// use our own version. Win9x doesn't support this, so it is a nice check
|
||||
_CreateRemoteThread: function(hProcess: THandle; lpThreadAttributes: Pointer; dwStackSize: DWORD; lpStartAddress: TFNThreadStartRoutine; lpParameter: Pointer; dwCreationFlags: DWORD; var lpThreadId: DWORD): THandle; stdcall = nil;
|
||||
@ -1365,7 +1357,7 @@ procedure TGDBMIDebugger.InterruptTarget;
|
||||
begin
|
||||
if TargetPID = 0 then Exit;
|
||||
{$IFDEF UNIX}
|
||||
{$IFDEF Ver1_0}Kill{$ELSE}FpKill{$ENDIF}(TargetPID, SIGINT);
|
||||
FpKill(TargetPID, SIGINT);
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF WIN32}
|
||||
|
@ -815,7 +815,7 @@ begin
|
||||
FRubberbandType:=rbtSelection;
|
||||
FRubberbandCreationColor:=clMaroon;
|
||||
FRubberbandSelectionColor:=clNavy;
|
||||
Application.AddOnIdleHandler(@OnIdle {$IFDEF VER1_0}, true{$ENDIF});
|
||||
Application.AddOnIdleHandler(@OnIdle);
|
||||
end;
|
||||
|
||||
destructor TControlSelection.Destroy;
|
||||
|
@ -47,9 +47,6 @@ uses
|
||||
{$IFDEF IDE_MEM_CHECK}
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
{$IFDEF VER1_0}
|
||||
FPCAdds,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, TypInfo, LCLProc, LResources, Forms, Controls, LCLIntf,
|
||||
Dialogs, JITForm, ComponentReg, IDEProcs;
|
||||
|
||||
@ -107,12 +104,10 @@ type
|
||||
// TReader events
|
||||
procedure ReaderFindMethod(Reader: TReader; const FindMethodName: Ansistring;
|
||||
var Address: Pointer; var Error: Boolean);
|
||||
{$IFNDEF VER1_0}
|
||||
procedure ReaderSetMethodProperty(Reader: TReader; Instance: TPersistent;
|
||||
PropInfo: PPropInfo; const TheMethodName: string; var Handled: boolean);
|
||||
procedure ReaderPropertyNotFound(Reader: TReader; Instance: TPersistent;
|
||||
var PropName: string; IsPath: Boolean; var Handled, Skip: Boolean);
|
||||
{$ENDIF}
|
||||
procedure ReaderSetName(Reader: TReader; Component: TComponent;
|
||||
var NewName: Ansistring);
|
||||
procedure ReaderReferenceName(Reader: TReader; var RefName: Ansistring);
|
||||
@ -345,25 +340,11 @@ begin
|
||||
Designer.ValidateRename(AComponent, CurName, NewName);
|
||||
end;
|
||||
|
||||
{$IFDEF VER1_0}
|
||||
type
|
||||
TMyComponent = class(TComponent)
|
||||
function GetValidateRenameAddress: pointer;
|
||||
end;
|
||||
|
||||
{ TMyComponent }
|
||||
|
||||
class function TMyComponent.GetValidateRenameAddress: pointer;
|
||||
begin
|
||||
Result := @TComponent.ValidateRename;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function GetTComponentValidateRenameVMTOffset: integer;
|
||||
begin
|
||||
Result:=GetVMTVirtualMethodOffset(TComponent,
|
||||
{$IFNDEF VER1_0}@TComponent.ValidateRename
|
||||
{$ELSE}TMyComponent.GetValidateRenameAddress{$ENDIF},
|
||||
@TComponent.ValidateRename,
|
||||
TComponentWithOverrideValidateRename,
|
||||
@TComponentWithOverrideValidateRename.ValidateRename);
|
||||
end;
|
||||
@ -723,10 +704,8 @@ begin
|
||||
// connect TReader events
|
||||
Reader.OnError:=@ReaderError;
|
||||
Reader.OnFindMethod:=@ReaderFindMethod;
|
||||
{$IFNDEF VER1_0}
|
||||
Reader.OnPropertyNotFound:=@ReaderPropertyNotFound;
|
||||
Reader.OnSetMethodProperty:=@ReaderSetMethodProperty;
|
||||
{$ENDIF}
|
||||
Reader.OnSetName:=@ReaderSetName;
|
||||
Reader.OnReferenceName:=@ReaderReferenceName;
|
||||
Reader.OnAncestorNotFound:=@ReaderAncestorNotFound;
|
||||
@ -1230,7 +1209,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
procedure TJITComponentList.ReaderPropertyNotFound(Reader: TReader;
|
||||
Instance: TPersistent; var PropName: string; IsPath: Boolean;
|
||||
var Handled, Skip: Boolean);
|
||||
@ -1246,7 +1224,6 @@ procedure TJITComponentList.ReaderSetMethodProperty(Reader: TReader;
|
||||
begin
|
||||
//writeln('TJITComponentList.ReaderSetMethodProperty ',PropInfo^.Name,':=',TheMethodName);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TJITComponentList.ReaderSetName(Reader: TReader;
|
||||
Component: TComponent; var NewName: Ansistring);
|
||||
|
@ -29,7 +29,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, LResources, Buttons,
|
||||
StdCtrls, Dialogs, NVGL, {$IFDEF VER1_0}Linux{$ELSE}Unix{$ENDIF},
|
||||
StdCtrls, Dialogs, NVGL, Unix,
|
||||
GTKGLAreaControl;
|
||||
|
||||
type
|
||||
|
@ -858,22 +858,22 @@ type
|
||||
property AllocBy: Integer read FAllocBy write SetAllocBy default 0;
|
||||
property BorderStyle default bsSingle;
|
||||
property Columns: TListColumns read FColumns write SetColumns;
|
||||
property ColumnClick: Boolean index Ord(lvpColumnClick) read GetProperty write SetProperty {$IFNDEF VER1_0}default True{$ENDIF};
|
||||
property ColumnClick: Boolean index Ord(lvpColumnClick) read GetProperty write SetProperty default True;
|
||||
property DefaultItemHeight: integer read FDefaultItemHeight write SetDefaultItemHeight;
|
||||
property HideSelection: Boolean index Ord(lvpHideSelection) read GetProperty write SetProperty {$IFNDEF VER1_0}default True{$ENDIF};
|
||||
property HideSelection: Boolean index Ord(lvpHideSelection) read GetProperty write SetProperty default True;
|
||||
property HoverTime: Integer read GetHoverTime write SetHoverTime default -1;
|
||||
// property IconOptions: TIconOptions read FIconOptions write SetIconOptions;
|
||||
property Items: TListItems read FListItems write SetItems;
|
||||
property LargeImages: TCustomImageList index Ord(lvilLarge) read GetImageList write SetImageList;
|
||||
property MultiSelect: Boolean index Ord(lvpMultiselect) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property MultiSelect: Boolean index Ord(lvpMultiselect) read GetProperty write SetProperty default False;
|
||||
property OwnerData: Boolean read FOwnerData write SetOwnerData default False;
|
||||
property OwnerDraw: Boolean index Ord(lvpOwnerDraw) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property ReadOnly: Boolean index Ord(lvpReadOnly) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property OwnerDraw: Boolean index Ord(lvpOwnerDraw) read GetProperty write SetProperty default False;
|
||||
property ReadOnly: Boolean index Ord(lvpReadOnly) read GetProperty write SetProperty default False;
|
||||
property ScrolledLeft: integer read FScrolledLeft write SetScrolledLeft;
|
||||
property ScrolledTop: integer read FScrolledTop write SetScrolledTop;
|
||||
property ScrollBars: TScrollStyle read FScrollBars write SetScrollBars default ssBoth;
|
||||
property ShowColumnHeaders: Boolean index Ord(lvpShowColumnHeaders) read GetProperty write SetProperty {$IFNDEF VER1_0}default True{$ENDIF};
|
||||
property ShowWorkAreas: Boolean index Ord(lvpShowWorkAreas) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property ShowColumnHeaders: Boolean index Ord(lvpShowColumnHeaders) read GetProperty write SetProperty default True;
|
||||
property ShowWorkAreas: Boolean index Ord(lvpShowWorkAreas) read GetProperty write SetProperty default False;
|
||||
property SmallImages: TCustomImageList index Ord(lvilSmall) read GetImageList write SetImageList;
|
||||
property SortType: TSortType read FSortType write SetSortType;
|
||||
property SortColumn: Integer read FSortColumn write SetSortColumn;
|
||||
@ -885,11 +885,6 @@ type
|
||||
property OnDeletion: TLVDeletedEvent read FOnDeletion write FOnDeletion;
|
||||
property OnInsert: TLVInsertEvent read FOnInsert write FOnInsert;
|
||||
property OnSelectItem: TLVSelectItemEvent read FOnSelectItem write FOnSelectItem;
|
||||
{$ifdef ver1_0}
|
||||
// repeated as workaround for fpc 1.0.x bug,
|
||||
// which can't access a protected property defined in another unit.
|
||||
property WidgetSetClass;
|
||||
{$endif}
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
@ -898,16 +893,16 @@ type
|
||||
function FindCaption(StartIndex: Integer; Value: string; Partial, Inclusive, Wrap: Boolean; PartStart: Boolean = True): TListItem;
|
||||
property BoundingRect: TRect read GetBoundingRect;
|
||||
property Canvas: TCanvas read FCanvas;
|
||||
property Checkboxes: Boolean index Ord(lvpCheckboxes) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property Checkboxes: Boolean index Ord(lvpCheckboxes) read GetProperty write SetProperty default False;
|
||||
property Column[AIndex: Integer]: TListColumn read GetColumnFromIndex;
|
||||
property DropTarget: TListItem read GetDropTarget write SetDropTarget;
|
||||
property FlatScrollBars: Boolean index Ord(lvpFlatScrollBars) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property FullDrag: Boolean index Ord(lvpFullDrag) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property GridLines: Boolean index Ord(lvpGridLines) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property HotTrack: Boolean index Ord(lvpHotTrack) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property FlatScrollBars: Boolean index Ord(lvpFlatScrollBars) read GetProperty write SetProperty default False;
|
||||
property FullDrag: Boolean index Ord(lvpFullDrag) read GetProperty write SetProperty default False;
|
||||
property GridLines: Boolean index Ord(lvpGridLines) read GetProperty write SetProperty default False;
|
||||
property HotTrack: Boolean index Ord(lvpHotTrack) read GetProperty write SetProperty default False;
|
||||
property HotTrackStyles: TListHotTrackStyles read FHotTrackStyles write SetHotTrackStyles default [];
|
||||
property ItemFocused: TListItem read GetFocused write SetFocused;
|
||||
property RowSelect: Boolean index Ord(lvpRowSelect) read GetProperty write SetProperty {$IFNDEF VER1_0}default False{$ENDIF};
|
||||
property RowSelect: Boolean index Ord(lvpRowSelect) read GetProperty write SetProperty default False;
|
||||
property SelCount: Integer read GetSelCount;
|
||||
property Selected: TListItem read GetSelection write SetSelection;
|
||||
property TabStop default true;
|
||||
|
@ -1688,14 +1688,12 @@ type
|
||||
end;
|
||||
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
{ TControlPropertyStorage }
|
||||
|
||||
TControlPropertyStorage = class(TCustomPropertyStorage)
|
||||
protected
|
||||
procedure GetPropertyList(List: TStrings); override;
|
||||
end;
|
||||
{$ENDIF not VER1_0}
|
||||
|
||||
|
||||
{ TDockZone }
|
||||
@ -2890,7 +2888,6 @@ begin
|
||||
inherited Assign(Source);
|
||||
end;
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
{ TControlPropertyStorage }
|
||||
|
||||
procedure TControlPropertyStorage.GetPropertyList(List: TStrings);
|
||||
@ -2930,7 +2927,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
{$ENDIF not VER1_0}
|
||||
|
||||
initialization
|
||||
//DebugLn('controls.pp - initialization');
|
||||
|
@ -947,9 +947,7 @@ begin
|
||||
L:=L+' ';
|
||||
L:=L+TField(LF[i]).AsString;
|
||||
end;
|
||||
BC.AddBar(L,
|
||||
{$IFDEF VER1_0}StrToIntDef(VF.AsString,0){$ELSE}VF.AsInteger{$ENDIF},
|
||||
AColor);
|
||||
BC.AddBar(L, VF.AsInteger, AColor);
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
@ -35,13 +35,7 @@ interface
|
||||
{$endif}
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
{$ifdef VER1_0}
|
||||
// fpc 1.0.x needs unit in which redefined property originally is defined
|
||||
// otherwise IE 55665566 occurs.
|
||||
Controls,
|
||||
{$endif}
|
||||
StdCtrls, FileUtil;
|
||||
Classes, SysUtils, StdCtrls, FileUtil;
|
||||
|
||||
Type
|
||||
|
||||
|
@ -96,7 +96,7 @@ uses
|
||||
{$IFDEF win32}
|
||||
Dos;
|
||||
{$ELSE}
|
||||
{$IFDEF Ver1_0}Linux{$ELSE}Unix,BaseUnix{$ENDIF};
|
||||
Unix,BaseUnix;
|
||||
{$ENDIF}
|
||||
|
||||
var
|
||||
|
@ -1107,7 +1107,6 @@ type
|
||||
end;
|
||||
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
{ TFormPropertyStorage }
|
||||
|
||||
TFormPropertyStorage = class(TControlPropertyStorage)
|
||||
@ -1118,7 +1117,6 @@ type
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
{$ENDIF not VER1_0}
|
||||
|
||||
|
||||
{$IFNDEF UseFCLDataModule}
|
||||
|
@ -124,9 +124,7 @@ Operator = (Compare1, Compare2 : TFloatPoint) : Boolean;
|
||||
|
||||
Operator := (Value : TFloatPoint) : TPoint;
|
||||
|
||||
{$IfNdef ver1_0}
|
||||
Operator := (Value : TPoint) : TFloatPoint;
|
||||
{$EndIf}
|
||||
|
||||
Operator = (Compare1, Compare2 : TRect) : Boolean;
|
||||
|
||||
@ -284,7 +282,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IfNdef ver1_0}
|
||||
Operator := (Value : TPoint) : TFloatPoint;
|
||||
begin
|
||||
With Result do begin
|
||||
@ -292,7 +289,6 @@ begin
|
||||
Y := Value.Y;
|
||||
end;
|
||||
end;
|
||||
{$EndIf}
|
||||
|
||||
Operator = (Compare1, Compare2 : TRect) : Boolean;
|
||||
begin
|
||||
|
@ -2119,11 +2119,7 @@ var
|
||||
begin
|
||||
// Check if GetTextBuf is overridden, otherwise
|
||||
// we can call RealGetText directly
|
||||
{$IFDEF VER1_0}
|
||||
if Pointer(@Self.GetTextBuf) = Pointer(@TControl.GetTextBuf)
|
||||
{$ELSE}
|
||||
if TMethod(@Self.GetTextBuf).Code = Pointer(@TControl.GetTextBuf)
|
||||
{$ENDIF}
|
||||
then begin
|
||||
Result := RealGetText;
|
||||
end
|
||||
@ -3130,11 +3126,7 @@ begin
|
||||
|
||||
// Check if SetTextBuf is overridden, otherwise
|
||||
// we can call RealSetText directly
|
||||
{$IFDEF VER1_0}
|
||||
if Pointer(@Self.GetTextBuf) = Pointer(@TControl.GetTextBuf)
|
||||
{$ELSE}
|
||||
if TMethod(@Self.SetTextBuf).Code = Pointer(@TControl.SetTextBuf)
|
||||
{$ENDIF}
|
||||
then begin
|
||||
RealSetText(Value);
|
||||
end
|
||||
|
@ -112,11 +112,6 @@ begin
|
||||
//DebugLn('[TCustomForm.Destroy] A ',Name,':',ClassName);
|
||||
if not (csDestroying in ComponentState) then ;//GlobalNameSpace.BeginWrite;
|
||||
try
|
||||
// ------
|
||||
// Temp hack to get Beforedestruction called
|
||||
// FPC1.0.x doesn't call itself before destruction
|
||||
{$IFDEF VER1_0}BeforeDestruction;{$ENDIF}
|
||||
// ------
|
||||
FreeThenNil(FMenu);
|
||||
FreeThenNil(FIcon);
|
||||
Screen.RemoveForm(Self);
|
||||
@ -1936,7 +1931,6 @@ begin
|
||||
end;
|
||||
|
||||
//==============================================================================
|
||||
{$IFNDEF VER1_0}
|
||||
|
||||
{ TFormPropertyStorage }
|
||||
|
||||
@ -1968,7 +1962,6 @@ begin
|
||||
TControl(Owner).RemoveAllHandlersOfObject(Self);
|
||||
inherited Destroy;
|
||||
end;
|
||||
{$ENDIF not VER1_0}
|
||||
|
||||
|
||||
// included by forms.pp
|
||||
|
@ -112,9 +112,7 @@ procedure TCustomLabeledEdit.CreateInternalLabel;
|
||||
begin
|
||||
if FEditLabel<>nil then exit;
|
||||
FEditLabel := TBoundLabel.Create(Self);
|
||||
{$IFNDEF VER1_9_8} //fpc 1.9.8 can't stream subcomponents.
|
||||
Include(FEditLabel.ComponentStyle, csSubComponent);
|
||||
{$ENDIF}
|
||||
FEditLabel.FreeNotification(Self);
|
||||
FEditLabel.FocusControl := Self;
|
||||
end;
|
||||
|
@ -368,12 +368,6 @@ end;
|
||||
{------------------------------------------------------------------------------}
|
||||
destructor TCustomListView.Destroy;
|
||||
begin
|
||||
{$IFDEF VER1_0}
|
||||
// we need the csDestroying flag.
|
||||
// FPC 1.0.x doesnt call BeforeDestruction
|
||||
BeforeDestruction;
|
||||
{$ENDIF}
|
||||
|
||||
FreeAndNil(FColumns);
|
||||
FreeAndNil(FImageChangeLink);
|
||||
FreeAndNil(FListItems);
|
||||
|
@ -442,19 +442,19 @@ begin
|
||||
{$IFDEF win32}
|
||||
raise Exception.Create('"'+AFilename+'" is not symlink');
|
||||
{$ELSE}
|
||||
if {$IFDEF Ver1_0}Linux.ReadLink{$ELSE}FpReadLink{$ENDIF}(AFilename)='' then begin
|
||||
if FpReadLink(AFilename)='' then begin
|
||||
AText:='"'+AFilename+'"';
|
||||
case {$ifdef ver1_0} LinuxError {$else} fpGetErrno() {$endif} of
|
||||
{$IFDEF Ver1_0}sys_eacces{$ELSE}ESysEAcces{$ENDIF}:
|
||||
case fpGetErrno() of
|
||||
ESysEAcces:
|
||||
AText:='read access denied for '+AText;
|
||||
{$IFDEF Ver1_0}sys_enoent{$ELSE}ESysENoEnt{$ENDIF}:
|
||||
ESysENoEnt:
|
||||
AText:='a directory component in '+AText
|
||||
+' does not exist or is a dangling symlink';
|
||||
{$IFDEF Ver1_0}sys_enotdir{$ELSE}ESysENotDir{$ENDIF}:
|
||||
ESysENotDir:
|
||||
AText:='a directory component in '+Atext+' is not a directory';
|
||||
{$IFDEF Ver1_0}sys_enomem{$ELSE}ESysENoMem{$ENDIF}:
|
||||
ESysENoMem:
|
||||
AText:='insufficient memory';
|
||||
{$IFDEF Ver1_0}sys_eloop{$ELSE}ESysELoop{$ENDIF}:
|
||||
ESysELoop:
|
||||
AText:=AText+' has a circular symbolic link';
|
||||
else
|
||||
AText:=AText+' is not a symbolic link';
|
||||
@ -472,7 +472,7 @@ begin
|
||||
{$IFDEF win32}
|
||||
Result:=false;
|
||||
{$ELSE}
|
||||
Result:=({$IFDEF Ver1_0}Linux.ReadLink{$ELSE}FpReadLink{$ENDIF}(AFilename)<>'');
|
||||
Result:=(FpReadLink(AFilename)<>'');
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
@ -484,12 +484,8 @@ begin
|
||||
{$IFDEF win32}
|
||||
Result:=true;
|
||||
{$ELSE}
|
||||
{$IFDEF Ver1_0}
|
||||
Result:= Linux.Access(AFilename,Linux.R_OK);
|
||||
{$ELSE}
|
||||
Result:= BaseUnix.FpAccess(AFilename,BaseUnix.R_OK)=0;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -500,12 +496,8 @@ begin
|
||||
{$IFDEF win32}
|
||||
Result:=((FileGetAttr(AFilename) and faReadOnly)=0);
|
||||
{$ELSE}
|
||||
{$IFDEF Ver1_0}
|
||||
Result:= Linux.Access(AFilename,Linux.W_OK);
|
||||
{$ELSE}
|
||||
Result:= BaseUnix.FpAccess(AFilename,BaseUnix.W_OK)=0;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -522,18 +514,18 @@ var
|
||||
// size
|
||||
// date
|
||||
// time
|
||||
mode: {$ifdef ver1_0}longint{$else}mode_t {$endif};
|
||||
mode: mode_t;
|
||||
{$ENDIF}
|
||||
begin
|
||||
Result:='';
|
||||
{$IFDEF win32}
|
||||
|
||||
{$ELSE}
|
||||
if not {$IFDEF Ver1_0}FStat{$ELSE}(FpStat{$ENDIF}(AFilename,info){$IFNDEF Ver1_0}=0){$ENDIF} then exit;
|
||||
if not (FpStat(AFilename,info)=0) then exit;
|
||||
|
||||
// permissions
|
||||
// file type
|
||||
mode:={$ifdef ver1_0} info.mode {$else} info.st_mode {$endif};
|
||||
mode:= info.st_mode;
|
||||
if STAT_IFLNK and mode=STAT_IFLNK then
|
||||
Result:=Result+'l'
|
||||
else
|
||||
@ -592,7 +584,7 @@ begin
|
||||
//Result:=Result+' Owner: '+IntToStr(info.uid)+'.'+IntToStr(info.gid);
|
||||
|
||||
// size
|
||||
Result:=Result+rsSize+IntToStr({$ifdef ver1_0}info.size{$else}info.st_size{$endif});
|
||||
Result:=Result+rsSize+IntToStr(info.st_size);
|
||||
|
||||
{$ENDIF}
|
||||
// date + time
|
||||
@ -622,20 +614,20 @@ begin
|
||||
|
||||
{$ELSE}
|
||||
repeat
|
||||
LinkFilename:={$IFDEF Ver1_0}Linux.ReadLink{$ELSE}FpReadLink{$ENDIF}(Result);
|
||||
LinkFilename:=FpReadLink(Result);
|
||||
if LinkFilename='' then begin
|
||||
AText:='"'+Filename+'"';
|
||||
case {$ifdef ver1_0} LinuxError {$else} fpGetErrno() {$endif} of
|
||||
{$IFDEF Ver1_0}sys_eacces{$ELSE}ESysEAcces{$ENDIF}:
|
||||
case fpGetErrno() of
|
||||
ESysEAcces:
|
||||
AText:='read access denied for '+AText;
|
||||
{$IFDEF Ver1_0}sys_enoent{$ELSE}ESysENoEnt{$ENDIF}:
|
||||
ESysENoEnt:
|
||||
AText:='a directory component in '+AText
|
||||
+' does not exist or is a dangling symlink';
|
||||
{$IFDEF Ver1_0}sys_enotdir{$ELSE}ESysENotDir{$ENDIF}:
|
||||
ESysENotDir:
|
||||
AText:='a directory component in '+Atext+' is not a directory';
|
||||
{$IFDEF Ver1_0}sys_enomem{$ELSE}ESysENoMem{$ENDIF}:
|
||||
ESysENoMem:
|
||||
AText:='insufficient memory';
|
||||
{$IFDEF Ver1_0}sys_eloop{$ELSE}ESysELoop{$ENDIF}:
|
||||
ESysELoop:
|
||||
AText:=AText+' has a circular symbolic link';
|
||||
else
|
||||
// not a symbolic link, just a regular file
|
||||
@ -675,12 +667,8 @@ begin
|
||||
{$IFDEF win32}
|
||||
Result:=FileExists(AFilename);
|
||||
{$ELSE}
|
||||
{$IFDEF Ver1_0}
|
||||
Result:= Linux.Access(AFilename,Linux.X_OK);
|
||||
{$ELSE}
|
||||
Result:= BaseUnix.FpAccess(AFilename,BaseUnix.X_OK)=0;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -703,17 +691,17 @@ begin
|
||||
if not FileIsExecutable(AFilename) then
|
||||
begin
|
||||
AText:='"'+AFilename+'"';
|
||||
case {$ifdef ver1_0} LinuxError {$else} fpGetErrno() {$endif} of
|
||||
{$IFDEF Ver1_0}sys_eacces{$ELSE}ESysEAcces{$ENDIF}:
|
||||
case fpGetErrno() of
|
||||
ESysEAcces:
|
||||
AText:='read access denied for '+AText;
|
||||
{$IFDEF Ver1_0}sys_enoent{$ELSE}ESysENoEnt{$ENDIF}:
|
||||
ESysENoEnt:
|
||||
AText:='a directory component in '+AText
|
||||
+' does not exist or is a dangling symlink';
|
||||
{$IFDEF Ver1_0}sys_enotdir{$ELSE}ESysENotDir{$ENDIF}:
|
||||
ESysENotDir:
|
||||
AText:='a directory component in '+Atext+' is not a directory';
|
||||
{$IFDEF Ver1_0}sys_enomem{$ELSE}ESysENoMem{$ENDIF}:
|
||||
ESysENoMem:
|
||||
AText:='insufficient memory';
|
||||
{$IFDEF Ver1_0}sys_eloop{$ELSE}ESysELoop{$ENDIF}:
|
||||
ESysELoop:
|
||||
AText:=AText+' has a circular symbolic link';
|
||||
else
|
||||
AText:=AText+' is not executable';
|
||||
@ -784,7 +772,7 @@ begin
|
||||
Result:=ParamStr(0);
|
||||
if ExtractFilePath(Result)='' then begin
|
||||
// program was started via PATH
|
||||
Result:=SearchFileInPath(Result,'',{$IFDEF Ver1_0}GetEnv{$ELSE}{$ifdef Unix}FpGetEnv{$else}GetEnv{$endif}{$ENDIF}('PATH'),':',
|
||||
Result:=SearchFileInPath(Result,'',{$ifdef Unix}FpGetEnv{$else}GetEnv{$endif}('PATH'),':',
|
||||
[sffDontSearchInBasePath]);
|
||||
end;
|
||||
// resolve links
|
||||
|
@ -123,20 +123,9 @@ end;
|
||||
procedure TListItemSubItems.Clear;
|
||||
var
|
||||
n: Integer;
|
||||
{$ifdef ver1_0}
|
||||
// fpc 1.0.x needs a var parameter for dispose.
|
||||
io: PListItemImageObject;
|
||||
{$endif}
|
||||
begin
|
||||
for n := 0 to Count - 1 do
|
||||
{$ifdef ver1_0}
|
||||
begin
|
||||
io := PListItemImageObject(inherited GetObject(n));
|
||||
Dispose(io);
|
||||
end;
|
||||
{$else}
|
||||
Dispose(PListItemImageObject(pointer(inherited GetObject(n))));
|
||||
{$endif}
|
||||
inherited;
|
||||
end;
|
||||
|
||||
@ -149,23 +138,13 @@ begin
|
||||
end;
|
||||
|
||||
procedure TListItemSubItems.Delete(AIndex: Integer);
|
||||
{$ifdef ver1_0}
|
||||
// fpc 1.0.x needs a var parameter for dispose.
|
||||
var
|
||||
io: PListItemImageObject;
|
||||
{$endif}
|
||||
begin
|
||||
if AIndex = Count
|
||||
then FChangeIndex := AIndex
|
||||
else FChangeIndex := -1;
|
||||
FUpdate := [siuText, siuImage];
|
||||
try
|
||||
{$ifdef ver1_0}
|
||||
io := PListItemImageObject(inherited GetObject(AIndex));
|
||||
Dispose(io);
|
||||
{$else}
|
||||
Dispose(PListItemImageObject(inherited GetObject(AIndex)));
|
||||
{$endif}
|
||||
inherited;
|
||||
finally
|
||||
FUpdate := [];
|
||||
|
@ -608,11 +608,9 @@ begin
|
||||
vtAnsiString: CurBtnCaption:=AnsiString(Buttons[i].VAnsiString);
|
||||
vtChar: CurBtnCaption:=Buttons[i].VChar;
|
||||
vtPChar: CurBtnCaption:=Buttons[i].VPChar;
|
||||
{$ifndef VER1_0}
|
||||
vtPWideChar: CurBtnCaption:=Buttons[i].VPWideChar;
|
||||
vtWideChar: CurBtnCaption:=Buttons[i].VWideChar;
|
||||
vtWidestring: CurBtnCaption:=WideString(Buttons[i].VWideString);
|
||||
{$endif VER1_0}
|
||||
else
|
||||
dec(i);
|
||||
end;
|
||||
|
@ -19,11 +19,6 @@ unit IniPropStorage;
|
||||
|
||||
interface
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
{$DEFINE EnableSessionProps}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
uses
|
||||
Classes, SysUtils, Forms, IniFiles, PropertyStorage;
|
||||
|
||||
@ -69,7 +64,6 @@ Type
|
||||
property OnRestoreProperties;
|
||||
end;
|
||||
|
||||
{$ENDIF not VER1_0}
|
||||
|
||||
Procedure Register;
|
||||
|
||||
@ -79,12 +73,9 @@ implementation
|
||||
|
||||
Procedure Register;
|
||||
begin
|
||||
{$IFDEF EnableSessionProps}
|
||||
RegisterComponents('Misc',[TIniPropStorage]);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
{ Should move to strutils when 1.9.6 is out. }
|
||||
|
||||
function FindPart(const HelpWilds, InputStr: string): Integer;
|
||||
@ -302,6 +293,5 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ENDIF not VER1_0}
|
||||
end.
|
||||
|
||||
|
@ -371,14 +371,6 @@ const
|
||||
GDKX_KEY_LaunchE = $1008FF4E;
|
||||
GDKX_KEY_LaunchF = $1008FF4F;
|
||||
|
||||
// fpc 1.0.10 doesn't link exported variables correctly
|
||||
// we fix this for gtk1 and define a constant
|
||||
{$IFDEF VER1_0}
|
||||
{$IFDEF gtk1}
|
||||
GTK_MAJOR_VERSION = 1;
|
||||
GTK_MINOR_VERSION = 2;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
function NewPGDIObject: PGDIObject;
|
||||
procedure DisposePGDIObject(GDIObject: PGdiObject);
|
||||
|
@ -3930,11 +3930,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ifndef VER1_0}
|
||||
var
|
||||
{$else}
|
||||
const
|
||||
{$endif}
|
||||
{$IFDef GTK1}
|
||||
NoteBookCloseBtnPixmapImg: PGdkPixmap = nil;
|
||||
NoteBookCloseBtnPixmapMask: PGdkPixmap = nil;
|
||||
@ -8176,11 +8172,7 @@ begin
|
||||
end;
|
||||
|
||||
{$IFDEF GTK1}
|
||||
{$IFNDEF VER1_0}
|
||||
var
|
||||
{$ELSE}
|
||||
const
|
||||
{$ENDIF}
|
||||
FirstScreenCalled: Boolean = False;
|
||||
FirstScreenResult: Boolean = False;
|
||||
{$IFDEF UseXinerama}
|
||||
|
@ -37,9 +37,7 @@ uses
|
||||
{$endif}
|
||||
SysUtils, Classes, FPCAdds,
|
||||
{$IFDEF UNIX}
|
||||
{$ifndef VER1_0}
|
||||
baseunix, unix,
|
||||
{$endif}
|
||||
{$IFDEF GTK1}
|
||||
X, XLib, XUtil, XAtom, //Font retrieval and Keyboard handling
|
||||
{$ENDIF not Gtk1}
|
||||
@ -977,7 +975,6 @@ var
|
||||
threadsync_pipein, threadsync_pipeout: cint;
|
||||
threadsync_giochannel: pgiochannel;
|
||||
|
||||
{$ifndef VER1_9_8}
|
||||
type
|
||||
TSynchronizeGlue = class(TObject)
|
||||
public
|
||||
@ -985,9 +982,6 @@ type
|
||||
end;
|
||||
|
||||
procedure TSynchronizeGlue.PrepareSynchronize(AObject: TObject);
|
||||
{$else}
|
||||
procedure PrepareSynchronize;
|
||||
{$endif}
|
||||
begin
|
||||
// wake up GUI thread by send a byte through the threadsync pipe
|
||||
fpwrite(threadsync_pipeout, ' ', 1);
|
||||
@ -1011,10 +1005,8 @@ procedure InitGTKProc;
|
||||
var
|
||||
lgs: TLazGtkStyle;
|
||||
{$ifdef USE_SYNCHRONIZE}
|
||||
{$ifndef VER1_9_8}
|
||||
needInstancePtr: TSynchronizeGlue;
|
||||
{$endif}
|
||||
{$endif}
|
||||
begin
|
||||
|
||||
FillChar(MCharToVK, SizeOf(MCharToVK), $FF);
|
||||
@ -1033,11 +1025,7 @@ begin
|
||||
|
||||
{$ifdef USE_SYNCHRONIZE}
|
||||
{ TThread.Synchronize ``glue'' }
|
||||
{$ifdef VER1_9_8}
|
||||
SynchronizeMethodProc := @PrepareSynchronize;
|
||||
{$else}
|
||||
WakeMainThread := @needInstancePtr.PrepareSynchronize;
|
||||
{$endif}
|
||||
assignpipe(threadsync_pipein, threadsync_pipeout);
|
||||
threadsync_giochannel := g_io_channel_unix_new(threadsync_pipein);
|
||||
g_io_add_watch(threadsync_giochannel, G_IO_IN, @threadsync_iocallback, nil);
|
||||
@ -1049,12 +1037,8 @@ begin
|
||||
DoneKeyboardTables;
|
||||
|
||||
{$ifdef USE_SYNCHRONIZE}
|
||||
{$ifdef VER1_9_8}
|
||||
SynchronizeMethodProc := nil;
|
||||
{$else}
|
||||
WakeMainThread := nil;
|
||||
{$endif}
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
{$IFDEF GTK1}
|
||||
|
@ -20,13 +20,6 @@
|
||||
|
||||
type
|
||||
TLVHack = class(TCustomListView)
|
||||
{$IFDEF VER1_0}
|
||||
protected
|
||||
property Columns;
|
||||
property MultiSelect;
|
||||
property SmallImages;
|
||||
property ViewStyle;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
PCustomListViewData = ^TCustomListViewData;
|
||||
|
@ -17,13 +17,6 @@
|
||||
|
||||
type
|
||||
TLVHack = class(TCustomListView)
|
||||
{$IFDEF VER1_0}
|
||||
protected
|
||||
property Columns;
|
||||
property MultiSelect;
|
||||
property SmallImages;
|
||||
property ViewStyle;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
////////////////////////////////////////
|
||||
|
@ -268,12 +268,6 @@ Initialization
|
||||
MouseDownTime := GetTickCount - 5000;
|
||||
MouseDownWindow := 0;
|
||||
|
||||
{$ifndef VER1_0}
|
||||
{ TThread.Synchronize support }
|
||||
{$ifdef ver1_9_8}
|
||||
SynchronizeMethodProc := @PrepareSynchronize;
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
Finalization
|
||||
|
||||
|
@ -199,10 +199,8 @@ begin
|
||||
ReleaseDC(Handle, DC);
|
||||
|
||||
// Thread.Synchronize support
|
||||
{$IFNDEF VER1_0}{$IFNDEF VER1_9_8}
|
||||
WakeMainThread := @HandleWakeMainThread;
|
||||
{$ENDIF}{$ENDIF}
|
||||
|
||||
|
||||
Assert(False, 'Trace:Win32Object.Init - Exit');
|
||||
end;
|
||||
|
||||
@ -311,10 +309,8 @@ Begin
|
||||
TranslateMessage(@AMessage);
|
||||
DispatchMessage(@AMessage);
|
||||
End;
|
||||
{$ifndef VER1_0}
|
||||
// check for pending to-be synchronized methods
|
||||
CheckSynchronize;
|
||||
{$endif}
|
||||
End;
|
||||
End;
|
||||
|
||||
|
@ -397,7 +397,7 @@ begin
|
||||
if not WSCheckHandleAllocated(ALV, 'GetBoundingRect')
|
||||
then Exit;
|
||||
|
||||
ListView_GetViewRect(ALV.Handle, {$IFDEF VER1_0}Windows.TRect(Result){$ELSE}Result{$ENDIF});
|
||||
ListView_GetViewRect(ALV.Handle, Result);
|
||||
end;
|
||||
|
||||
function TWin32WSCustomListView.GetDropTarget(const ALV: TCustomListView): Integer;
|
||||
@ -487,7 +487,7 @@ procedure TWin32WSCustomListView.PositionHeader(const AHandle: THandle);
|
||||
var
|
||||
hwndHeader: HWND;
|
||||
dwStyle: DWORD;
|
||||
rc: {$IFDEF VER1_0}Windows.{$ENDIF}TRect;
|
||||
rc: TRect;
|
||||
hdLayout: THDLAYOUT;
|
||||
wpos: TWINDOWPOS;
|
||||
begin
|
||||
|
@ -162,11 +162,7 @@ var
|
||||
OldCheckmark := SelectObject(hdcNewBitmap, hbmpCheck);
|
||||
OldTransBitmap := SelectObject(hdcTransBitmap, hbmpTrans);
|
||||
// fill transparent-bitmap with transparent color
|
||||
{$IFNDEF VER1_0}
|
||||
rectBitmap := RECT(0, 0, bmpWidth, bmpHeight);
|
||||
{$ELSE}
|
||||
rectBitmap := Windows.Rect(RECT(0, 0, bmpWidth, bmpHeight));
|
||||
{$ENDIF}
|
||||
FillRect(hdcTransBitmap, rectBitmap, hbrTrans);
|
||||
// blit menu icon transparently
|
||||
TWin32WidgetSet(InterfaceObject).MaskBlt(hdcTransBitmap, 0, 0, bmpWidth,
|
||||
@ -217,11 +213,7 @@ begin
|
||||
if AMenuItem.Checked then fState:=fState or MFS_CHECKED;
|
||||
fMask:=MIIM_ID or MIIM_DATA or MIIM_STATE or MIIM_TYPE;
|
||||
wID:=AMenuItem.Command; {value may only be 16 bit wide!}
|
||||
{$IFNDEF VER1_0}
|
||||
dwItemData:=PtrInt(AMenuItem);
|
||||
{$ELSE}
|
||||
dwItemData:=Integer(AMenuItem);
|
||||
{$ENDIF}
|
||||
// Note: can't use "and MFT_STRING", because MFT_STRING is zero :-)
|
||||
if (AMenuItem.Count > 0) then
|
||||
begin
|
||||
|
@ -79,11 +79,6 @@ Const
|
||||
TCS_VERTICAL = $0080;
|
||||
TCS_MULTILINE = $0200;
|
||||
|
||||
{$IFDEF VER1_0}
|
||||
ICON_SMALL = 0;
|
||||
ICON_BIG = 1;
|
||||
{$ENDIF}
|
||||
|
||||
{ BrowseForFolder dialog}
|
||||
BIF_RETURNONLYFSDIRS = 1;
|
||||
|
||||
|
@ -3072,36 +3072,14 @@ end;
|
||||
|
||||
procedure TLazReaderBMP.SetupRead(nPalette, nRowBits: Integer; Stream: TStream;
|
||||
ReadPalette: Boolean);
|
||||
{$ifdef VER1_0}
|
||||
type
|
||||
tcolinfo = ARRAY [0..0] OF TColorRGBA;
|
||||
pcolinfo = ^tcolinfo;
|
||||
var
|
||||
ColInfo: pcolinfo;
|
||||
{$else}
|
||||
var
|
||||
ColInfo: ARRAY OF TColorRGBA;
|
||||
{$endif}
|
||||
i: Integer;
|
||||
FPcolor: TFPcolor;
|
||||
begin
|
||||
if nPalette > 0
|
||||
then begin
|
||||
GetMem(FPalette, nPalette*SizeOf(TFPColor));
|
||||
{$ifdef VER1_0}
|
||||
GetMem(ColInfo, nPalette*Sizeof(TColorRGBA));
|
||||
if ReadPalette then begin
|
||||
if BFI.biClrUsed>0 then
|
||||
Stream.Read(ColInfo^[0],BFI.biClrUsed*SizeOf(TColorRGBA))
|
||||
else // Seems to me that this is dangerous.
|
||||
Stream.Read(ColInfo^[0],nPalette*SizeOf(TColorRGBA));
|
||||
for i := 0 to nPalette-1 do begin
|
||||
FPcolor := BmpRGBAToFPColor(ColInfo^[i]);
|
||||
FPcolor.alpha := alphaOpaque; { No transparency info in palette }
|
||||
FPalette[i] := FPcolor;
|
||||
end;
|
||||
end;
|
||||
{$else}
|
||||
SetLength(ColInfo, nPalette);
|
||||
if ReadPalette then begin
|
||||
if (BFI.biClrUsed > 0)
|
||||
@ -3115,7 +3093,6 @@ begin
|
||||
FPalette[i] := FPcolor;
|
||||
end;
|
||||
end;
|
||||
{$endif}
|
||||
end
|
||||
else begin
|
||||
{ Skip palette }
|
||||
@ -3125,9 +3102,6 @@ begin
|
||||
end;
|
||||
ReadSize:=((nRowBits + 31) div 32) shl 2;
|
||||
GetMem(LineBuf,ReadSize);
|
||||
{$ifdef VER1_0}
|
||||
FreeMem(ColInfo, nPalette*Sizeof(TColorRGBA));
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
procedure TLazReaderBMP.ReadScanLine(Row: Integer; Stream: TStream);
|
||||
|
@ -82,7 +82,7 @@ implementation
|
||||
|
||||
{$IFNDEF Win32}
|
||||
uses
|
||||
{$IFDEF Ver1_0}Linux{$ELSE}Unix{$ENDIF};
|
||||
Unix;
|
||||
{$ENDIF}
|
||||
|
||||
var
|
||||
|
@ -210,37 +210,29 @@ function BEtoN(const AValue: SmallInt): SmallInt;
|
||||
function BEtoN(const AValue: Word): Word;
|
||||
function BEtoN(const AValue: LongInt): LongInt;
|
||||
function BEtoN(const AValue: DWord): DWord;
|
||||
{$IFNDEF VER1_0} // fpc 1.0.x can't handle 64 bits constants
|
||||
function BEtoN(const AValue: Int64): Int64;
|
||||
function BEtoN(const AValue: QWord): QWord;
|
||||
{$ENDIF}
|
||||
|
||||
function LEtoN(const AValue: SmallInt): SmallInt;
|
||||
function LEtoN(const AValue: Word): Word;
|
||||
function LEtoN(const AValue: LongInt): LongInt;
|
||||
function LEtoN(const AValue: DWord): DWord;
|
||||
{$IFNDEF VER1_0} // fpc 1.0.x can't handle 64 bits constants
|
||||
function LEtoN(const AValue: Int64): Int64;
|
||||
function LEtoN(const AValue: QWord): QWord;
|
||||
{$ENDIF}
|
||||
|
||||
function NtoBE(const AValue: SmallInt): SmallInt;
|
||||
function NtoBE(const AValue: Word): Word;
|
||||
function NtoBE(const AValue: LongInt): LongInt;
|
||||
function NtoBE(const AValue: DWord): DWord;
|
||||
{$IFNDEF VER1_0} // fpc 1.0.x can't handle 64 bits constants
|
||||
function NtoBE(const AValue: Int64): Int64;
|
||||
function NtoBE(const AValue: QWord): QWord;
|
||||
{$ENDIF}
|
||||
|
||||
function NtoLE(const AValue: SmallInt): SmallInt;
|
||||
function NtoLE(const AValue: Word): Word;
|
||||
function NtoLE(const AValue: LongInt): LongInt;
|
||||
function NtoLE(const AValue: DWord): DWord;
|
||||
{$IFNDEF VER1_0} // fpc 1.0.x can't handle 64 bits constants
|
||||
function NtoLE(const AValue: Int64): Int64;
|
||||
function NtoLE(const AValue: QWord): QWord;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
implementation
|
||||
@ -826,7 +818,7 @@ var
|
||||
function GetDebugFileName: string;
|
||||
const
|
||||
DebugLogStart = '--debug-log=';
|
||||
DebugLogStartLength = {$IFNDEF VER1_0}length(DebugLogStart){$ELSE}12{$ENDIF};
|
||||
DebugLogStartLength = length(DebugLogStart);
|
||||
var
|
||||
i: integer;
|
||||
EnvVarName: string;
|
||||
@ -1678,7 +1670,6 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
function BEtoN(const AValue: Int64): Int64;
|
||||
begin
|
||||
{$IFDEF ENDIAN_BIG}
|
||||
@ -1710,7 +1701,6 @@ begin
|
||||
or (AValue shr 56);
|
||||
{$ENDIF}
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function LEtoN(const AValue: SmallInt): SmallInt;
|
||||
begin
|
||||
@ -1754,7 +1744,6 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
function LEtoN(const AValue: Int64): Int64;
|
||||
begin
|
||||
{$IFDEF ENDIAN_LITTLE}
|
||||
@ -1786,7 +1775,6 @@ begin
|
||||
or (AValue shr 56);
|
||||
{$ENDIF}
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function NtoBE(const AValue: SmallInt): SmallInt;
|
||||
begin
|
||||
@ -1830,7 +1818,6 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
function NtoBE(const AValue: Int64): Int64;
|
||||
begin
|
||||
{$IFDEF ENDIAN_BIG}
|
||||
@ -1862,7 +1849,6 @@ begin
|
||||
or (AValue shr 56);
|
||||
{$ENDIF}
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function NtoLE(const AValue: SmallInt): SmallInt;
|
||||
begin
|
||||
@ -1906,7 +1892,6 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
function NtoLE(const AValue: Int64): Int64;
|
||||
begin
|
||||
{$IFDEF ENDIAN_LITTLE}
|
||||
@ -1938,7 +1923,6 @@ begin
|
||||
or (AValue shr 56);
|
||||
{$ENDIF}
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
initialization
|
||||
InitializeDebugOutput;
|
||||
|
@ -73,9 +73,7 @@ type
|
||||
|
||||
TCriticalSection = longint;
|
||||
PCriticalSection = ^TCriticalSection;
|
||||
{$IFNDEF VER1_0}
|
||||
TRTLCriticalSection = pointer;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
{$ifndef win32}
|
||||
|
@ -31,9 +31,7 @@ interface
|
||||
|
||||
uses Classes, SysUtils, FPCAdds, LCLType, GraphType
|
||||
{$ifdef win32}
|
||||
{$ifndef ver1_0}
|
||||
,messages
|
||||
{$endif ver1_0}
|
||||
{$endif win32}
|
||||
;
|
||||
|
||||
|
@ -267,9 +267,6 @@ procedure WriteLRSReversedWords(s: TStream; p: Pointer; Count: integer);
|
||||
|
||||
implementation
|
||||
|
||||
{$IFDEF HASWIDESTRING}{$IFNDEF VER1_9_8}
|
||||
{$DEFINE HASTOKENWIDESTRING}
|
||||
{$ENDIF}{$ENDIF}
|
||||
|
||||
const
|
||||
LineEnd: ShortString = LineEnding;
|
||||
@ -1704,7 +1701,7 @@ var
|
||||
end;
|
||||
toString:
|
||||
begin
|
||||
{$IFDEF HASTOKENWIDESTRING}
|
||||
{$IFDEF HASWIDESTRING}
|
||||
toStringBuf := parser.TokenWideString;
|
||||
{$ELSE}
|
||||
toStringBuf := parser.TokenString;
|
||||
@ -1713,7 +1710,7 @@ var
|
||||
begin
|
||||
parser.NextToken; // Get next string fragment
|
||||
parser.CheckToken(toString);
|
||||
{$IFDEF HASTOKENWIDESTRING}
|
||||
{$IFDEF HASWIDESTRING}
|
||||
toStringBuf := toStringBuf + parser.TokenWideString;
|
||||
{$ELSE}
|
||||
toStringBuf := toStringBuf + parser.TokenString;
|
||||
|
@ -19,15 +19,9 @@ unit PropertyStorage;
|
||||
|
||||
interface
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
{$DEFINE EnableSessionProps}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
{$IFDEF VER1_9_8}RTLConst{$ELSE}RTLConsts{$ENDIF}
|
||||
{$IFDEF EnableSessionProps}, RTTIUtils{$ENDIF};
|
||||
Classes, SysUtils, RTLConsts, RTTIUtils;
|
||||
|
||||
Type
|
||||
TPlacementOperation = (poSave, poRestore);
|
||||
@ -172,10 +166,8 @@ Type
|
||||
property OnRestoreProperties : TNotifyEvent read FOnRestoreProperties write FOnRestoreProperties;
|
||||
end;
|
||||
|
||||
{$ENDIF not VER1_0}
|
||||
implementation
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
function XorEncode(const Key, Source: string): string;
|
||||
var
|
||||
I: Integer;
|
||||
@ -577,7 +569,6 @@ begin
|
||||
FinishPropertyList(AStoredList);
|
||||
StorageNeeded(False);
|
||||
Try
|
||||
{$IFDEF EnableSessionProps}
|
||||
with TPropsStorage.Create do
|
||||
try
|
||||
Section := RootSection;
|
||||
@ -592,7 +583,6 @@ begin
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
{$ENDIF}
|
||||
Finally
|
||||
FreeStorage;
|
||||
end;
|
||||
@ -613,7 +603,6 @@ begin
|
||||
FinishPropertyList(L);
|
||||
StorageNeeded(True);
|
||||
Try
|
||||
{$IFDEF EnableSessionProps}
|
||||
with TPropsStorage.Create do
|
||||
try
|
||||
Section := RootSection;
|
||||
@ -626,7 +615,6 @@ begin
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
{$ENDIF}
|
||||
Finally
|
||||
FreeStorage;
|
||||
end;
|
||||
@ -636,16 +624,13 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomPropertyStorage.FinishPropertyList(List: TStrings);
|
||||
{$IFDEF EnableSessionProps}
|
||||
var
|
||||
i: Integer;
|
||||
CompName: string;
|
||||
PropName: string;
|
||||
ARoot: TComponent;
|
||||
AComponent: TComponent;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF EnableSessionProps}
|
||||
// set Objects (i.e. the component of each property)
|
||||
ARoot:=Root;
|
||||
for i:=List.Count-1 downto 0 do begin
|
||||
@ -663,7 +648,6 @@ begin
|
||||
List.Delete(i);
|
||||
end;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TCustomPropertyStorage.DoReadInteger(const Section, Ident: String;
|
||||
@ -726,7 +710,6 @@ begin
|
||||
StoredValues.StoredValue[AName] := Value;
|
||||
end;
|
||||
|
||||
{$ENDIF not VER1_0}
|
||||
|
||||
end.
|
||||
|
||||
|
@ -22,7 +22,7 @@ interface
|
||||
uses sysutils;
|
||||
|
||||
type
|
||||
TAssertErrorAddrType = {$IFNDEF VER1_0}Pointer{$ELSE}Longint{$ENDIF};
|
||||
TAssertErrorAddrType = Pointer;
|
||||
|
||||
TAssertErrorProc = procedure(Const Msg,FN :ShortString;
|
||||
LineNo: LongInt; TheAddr: TAssertErrorAddrType);
|
||||
|
@ -19,11 +19,7 @@ unit XMLPropStorage;
|
||||
|
||||
interface
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
{$DEFINE EnableSessionProps}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, Forms, PropertyStorage, XMLCfg, DOM;
|
||||
|
||||
@ -69,7 +65,6 @@ type
|
||||
property OnRestoringProperties;
|
||||
property OnRestoreProperties;
|
||||
end;
|
||||
{$ENDIF not VER1_0}
|
||||
|
||||
procedure Register;
|
||||
|
||||
@ -79,12 +74,9 @@ implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
{$IFDEF EnableSessionProps}
|
||||
RegisterComponents('Misc',[TXMLPropStorage]);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFNDEF VER1_0}
|
||||
{ TCustomXMLPropStorage }
|
||||
|
||||
procedure TCustomXMLPropStorage.StorageNeeded(ReadOnly: Boolean);
|
||||
@ -180,5 +172,4 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ENDIF not VER1_0}
|
||||
end.
|
||||
|
@ -46,7 +46,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, LResources, Graphics,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, Laz_XMLCfg,
|
||||
AVL_Tree, Laz_XMLCfg,
|
||||
DefineTemplates, CodeToolManager, EditDefineTree, CompilerOptions, Forms,
|
||||
FileUtil, PropEdits, LazIDEIntf,
|
||||
LazarusIDEStrConsts, IDEProcs, ComponentReg,
|
||||
|
@ -46,7 +46,7 @@ uses
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, FileUtil,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, Laz_XMLCfg,
|
||||
AVL_Tree, Laz_XMLCfg,
|
||||
LCLProc, Forms, Controls, Dialogs, LazarusIDEStrConsts, IDEProcs, LazConf,
|
||||
CompilerOptions, PackageLinks, PackageDefs, LazarusPackageIntf, ComponentReg,
|
||||
RegisterFCL, RegisterLCL, RegisterSynEdit, RegisterIDEIntf;
|
||||
|
@ -40,7 +40,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, LResources, Forms, Controls, Buttons, ComCtrls,
|
||||
StdCtrls, Menus, Dialogs, Graphics, FileCtrl,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF},
|
||||
AVL_Tree,
|
||||
IDECommands,
|
||||
LazConf, LazarusIDEStrConsts, IDEProcs, IDEOptionDefs, EnvironmentOpts,
|
||||
Project, PackageDefs, PackageSystem, PackageEditor;
|
||||
|
@ -48,7 +48,7 @@ uses
|
||||
Classes, SysUtils, LCLProc, Forms, Controls, FileUtil, Dialogs, Menus,
|
||||
// codetools
|
||||
CodeToolManager, CodeCache, BasicCodeTools,
|
||||
{$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, Laz_XMLCfg,
|
||||
AVL_Tree, Laz_XMLCfg,
|
||||
// IDE Interface
|
||||
NewItemIntf, ProjectIntf, PackageIntf, MenuIntf, LazIDEIntf,
|
||||
// IDE
|
||||
|
Loading…
Reference in New Issue
Block a user