From e91c979c4e264603938ad64178e3a65d72c568a4 Mon Sep 17 00:00:00 2001 From: vincents Date: Wed, 3 Aug 2005 20:14:56 +0000 Subject: [PATCH] removed $IFDEF VER1 from Salvatore git-svn-id: trunk@7475 - --- ide/componentpalette.pas | 2 +- ide/customformeditor.pp | 6 +----- ide/dialogprocs.pas | 2 +- ide/filereferencelist.pas | 2 +- ide/ideprocs.pp | 14 ++++---------- ide/include/darwin/lazconf.inc | 4 ---- ide/include/freebsd/lazconf.inc | 4 ---- ide/include/linux/lazconf.inc | 4 ---- ide/lazarusmanager.pas | 2 -- ide/main.pp | 10 +--------- ide/mainbase.pas | 2 +- ide/mainintf.pas | 2 +- ide/todolist.pp | 9 --------- 13 files changed, 11 insertions(+), 52 deletions(-) diff --git a/ide/componentpalette.pas b/ide/componentpalette.pas index 387e0cf1eb..b54e9209e0 100644 --- a/ide/componentpalette.pas +++ b/ide/componentpalette.pas @@ -39,7 +39,7 @@ interface uses Classes, SysUtils, LCLProc, Controls, Dialogs, Graphics, ExtCtrls, Buttons, - Menus, LResources, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, + Menus, LResources, AVL_Tree, PropEdits, FormEditingIntf, {$IFDEF CustomIDEComps} CustomIDEComps, diff --git a/ide/customformeditor.pp b/ide/customformeditor.pp index 55d4716e9a..244affe4b4 100644 --- a/ide/customformeditor.pp +++ b/ide/customformeditor.pp @@ -40,7 +40,7 @@ uses {$ENDIF} // LCL+FCL Classes, SysUtils, TypInfo, Math, - {$IFNDEF Ver1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, + AVL_Tree, LCLProc, Graphics, Controls, Forms, Menus, Dialogs, // components PropEdits, ObjectInspector, IDECommands, @@ -1733,10 +1733,6 @@ begin Result:=AClassName; if (length(Result)>1) and (Result[1]='T') then Result:=RightStr(Result,length(Result)-1); - {$IfDef VER1_0} - //make it more presentable - Result := Result[1] + lowercase(Copy(Result,2,length(Result))); - {$EndIf} Result:=Result+IntToStr(i); while (j>=0) and (AnsiCompareText(Result,OwnerComponent.Components[j].Name)<>0) do diff --git a/ide/dialogprocs.pas b/ide/dialogprocs.pas index 856a432d97..640ca3d480 100644 --- a/ide/dialogprocs.pas +++ b/ide/dialogprocs.pas @@ -38,7 +38,7 @@ interface uses Classes, SysUtils, LCLProc, LResources, Forms, Controls, Dialogs, FileUtil, - CodeCache, CodeToolManager, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, + CodeCache, CodeToolManager, AVL_Tree, IDEProcs, LazarusIDEStrConsts; type diff --git a/ide/filereferencelist.pas b/ide/filereferencelist.pas index 6ddcb5f81d..5f9bf9c507 100644 --- a/ide/filereferencelist.pas +++ b/ide/filereferencelist.pas @@ -39,7 +39,7 @@ unit FileReferenceList; interface uses - Classes, SysUtils, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, FileUtil, + Classes, SysUtils, AVL_Tree, FileUtil, IDEProcs; type diff --git a/ide/ideprocs.pp b/ide/ideprocs.pp index a184d9279e..9ebe9793bb 100644 --- a/ide/ideprocs.pp +++ b/ide/ideprocs.pp @@ -208,11 +208,7 @@ implementation uses Dos {$IfNDef Win32} - {$IFDEF Ver1_0} - ,Linux - {$ELSE} ,Unix,BaseUnix - {$ENDIF} {$EndIf}; function AddToRecentList(const s: string; RecentList: TStrings; @@ -1285,7 +1281,7 @@ begin {$IFDEF Win32} OldAttr:=FileGetAttr(Filename); {$ELSE} - {$IFDEF Ver1_0}FStat{$ELSE}FpStat{$ENDIF}(Filename,OldInfo); + FpStat(Filename,OldInfo); {$ENDIF} if not FileIsSymlink(Filename) then begin @@ -1307,8 +1303,7 @@ begin {$IFDEF Win32} FileSetAttr(FileName,OldAttr); {$ELSE} - {$IFDEF Ver1_0}Chmod{$ELSE}FpChmod{$ENDIF}(Filename, - {$IFDEF VER1_0}OldInfo.Mode{$ELSE} OldInfo.st_Mode{$endif} and (STAT_IRWXO+STAT_IRWXG+STAT_IRWXU + FpChmod(Filename, OldInfo.st_Mode and (STAT_IRWXO+STAT_IRWXG+STAT_IRWXU +STAT_ISUID+STAT_ISGID+STAT_ISVTX)); {$ENDIF} @@ -2052,7 +2047,7 @@ begin {$IFDEF Win32} OldAttr:=FileGetAttr(SrcFilename); {$ELSE} - {$IFDEF Ver1_0}FStat{$ELSE}FpStat{$ENDIF}(SrcFilename,OldInfo); + FpStat(SrcFilename,OldInfo); {$ENDIF} //writeln('CopyFileWithMethods ',SrcFilename,' ',DestFilename); @@ -2078,8 +2073,7 @@ begin {$IFDEF Win32} FileSetAttr(DestFileName,OldAttr); {$ELSE} - {$IFDEF Ver1_0}Chmod{$ELSE}FpChmod{$ENDIF}(DestFilename, - {$IFDEF VER1_0}OldInfo.Mode{$ELSE} OldInfo.st_Mode{$endif} and (STAT_IRWXO+STAT_IRWXG+STAT_IRWXU + FpChmod(DestFilename, OldInfo.st_Mode and (STAT_IRWXO+STAT_IRWXG+STAT_IRWXU +STAT_ISUID+STAT_ISGID+STAT_ISVTX)); {$ENDIF} diff --git a/ide/include/darwin/lazconf.inc b/ide/include/darwin/lazconf.inc index 4ac26cba67..c41d56150b 100644 --- a/ide/include/darwin/lazconf.inc +++ b/ide/include/darwin/lazconf.inc @@ -30,11 +30,7 @@ {Should become unit Unix in the future. For both Linux and FreeBSD} uses Dos, - {$IFNDEF VER1_0} BaseUnix, Unix; - {$ELSE} - linux; - {$ENDIF} function GetDefaultTargetOS: string; begin diff --git a/ide/include/freebsd/lazconf.inc b/ide/include/freebsd/lazconf.inc index 8c3e8cb0a5..8b0db2982c 100644 --- a/ide/include/freebsd/lazconf.inc +++ b/ide/include/freebsd/lazconf.inc @@ -30,11 +30,7 @@ {Should become unit Unix in the future. For both Linux and FreeBSD} uses Dos, - {$IFNDEF VER1_0} BaseUnix, Unix; - {$ELSE} - Linux; - {$ENDIF} function GetDefaultTargetOS: string; begin diff --git a/ide/include/linux/lazconf.inc b/ide/include/linux/lazconf.inc index 19d28e944e..05e9e7c8e8 100644 --- a/ide/include/linux/lazconf.inc +++ b/ide/include/linux/lazconf.inc @@ -28,11 +28,7 @@ } uses Dos, - {$IFNDEF VER1_0} Unix, BaseUnix; - {$ELSE} - Linux; - {$ENDIF} function GetDefaultTargetOS: string; begin diff --git a/ide/lazarusmanager.pas b/ide/lazarusmanager.pas index 021be98ea2..0083ec0035 100644 --- a/ide/lazarusmanager.pas +++ b/ide/lazarusmanager.pas @@ -299,9 +299,7 @@ end; procedure TLazarusProcess.Execute; begin FProcess.Execute; - {$IFNDEF VER1_0} Sleep(2000); - {$ENDIF} if Assigned(FOnStart) then FOnStart(Self); end; diff --git a/ide/main.pp b/ide/main.pp index dbb4c1a7b8..7255407162 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -66,7 +66,7 @@ uses Forms, Buttons, Menus, FileUtil, Controls, GraphType, Graphics, ExtCtrls, Dialogs, InterfaceBase, // codetools - {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, Laz_XMLCfg, + AVL_Tree, Laz_XMLCfg, CodeToolsStructs, CodeToolManager, CodeCache, DefineTemplates, // IDE interface AllIDEIntf, ObjectInspector, PropEdits, MacroIntf, IDECommands, SrcEditorIntf, @@ -6861,7 +6861,6 @@ procedure TMainIDE.DoRestart; StartLazProcess: TProcess; ExeName: string; begin -{$IFNDEF VER1_0} StartLazProcess := TProcess.Create(nil); try // TODO: use the target directory, where the new startlazarus is @@ -6879,17 +6878,10 @@ procedure TMainIDE.DoRestart; finally StartLazProcess.Free; end; -{$ENDIF} end; var CanClose: boolean; begin -{$IFDEF VER1_0} - if not StartedByStartLazarus then begin - DebugLn('Restarting Lazarus not supported, if compiled with fpc 1.0.x'); - exit; - end; -{$ENDIF} CanClose:=true; MainIDEBar.OnCloseQuery(Self, CanClose); if not CanClose then exit; diff --git a/ide/mainbase.pas b/ide/mainbase.pas index 71a22697b5..749efb291e 100644 --- a/ide/mainbase.pas +++ b/ide/mainbase.pas @@ -58,7 +58,7 @@ uses {$ENDIF} Classes, LCLType, LCLIntf, StdCtrls, Buttons, Menus, ComCtrls, SysUtils, Controls, Graphics, ExtCtrls, Dialogs, FileUtil, Forms, CodeToolManager, - CodeCache, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, SynEditKeyCmds, + CodeCache, AVL_Tree, SynEditKeyCmds, // IDE LazConf, LazarusIDEStrConsts, SrcEditorIntf, ProjectDefs, Project, PublishModule, BuildLazDialog, Compiler, LazIDEIntf, diff --git a/ide/mainintf.pas b/ide/mainintf.pas index 21fc49b1e0..ccec0972df 100644 --- a/ide/mainintf.pas +++ b/ide/mainintf.pas @@ -62,7 +62,7 @@ uses {$ENDIF} Classes, LCLType, LCLIntf, StdCtrls, Buttons, Menus, ComCtrls, SysUtils, Controls, Graphics, ExtCtrls, Dialogs, FileUtil, Forms, CodeToolManager, - CodeCache, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF}, SynEditKeyCmds, + CodeCache, AVL_Tree, SynEditKeyCmds, // IDE ObjectInspector, LazConf, LazarusIDEStrConsts, MacroIntf, diff --git a/ide/todolist.pp b/ide/todolist.pp index 8cee99cc90..9d91d35327 100644 --- a/ide/todolist.pp +++ b/ide/todolist.pp @@ -106,9 +106,7 @@ var implementation uses -{$ifndef ver1_0} StrUtils, -{$endif} FileUtil; Type @@ -542,13 +540,6 @@ Var TodoFLag := Flag; Result := Pos(UpperCase(Flag),UpperCase(TokenString)) > 1; end; - {$ifdef ver1_0} - //fpc 1.0.x has no strutils unit. - Function AnsiStartsText(const ASubText, AText: string): Boolean; - begin - Result:=Copy(AText,1,Length(AsubText))=ASubText; - end; - {$endif} begin if IsTodoFlag(cTodoFlag) or IsTodoFlag(cAltTodoFlag) then begin