UPD: Some changes for compatible with fpc 2.3.1

This commit is contained in:
Alexander Koblov 2007-05-17 21:56:40 +00:00
commit b5f198ab58
5 changed files with 40 additions and 5 deletions

View file

@ -296,7 +296,7 @@ ToolButton: TSpeedButton;
begin
ToolButton:= TSpeedButton.Create(Self);
Include(ToolButton.ComponentStyle, csSubComponent);
//Include(ToolButton.ComponentStyle, csSubComponent);
ToolButton.Parent:=Self;
ToolButton.Visible := True;
ToolButton.Left:=FPositionX;

View file

@ -11,6 +11,8 @@ object PackDlg: TPackDlg
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Caption = 'Pack files'
ClientHeight = 202
ClientWidth = 517
Font.Height = -11
Font.Name = 'MS Sans Serif'
OnShow = FormShow
@ -114,6 +116,8 @@ object PackDlg: TPackDlg
Top = 17
Width = 142
Caption = ' Packer '
ClientHeight = 115
ClientWidth = 138
Font.Color = clBtnText
Font.Height = -11
Font.Name = 'MS Sans Serif'

View file

@ -62,7 +62,7 @@ type
public
{ public declarations }
end;
procedure ShowPackFilesForm(var VFS : TVFS; var fl : TFileList; sDestPath:String);
procedure ShowPackFilesForm(VFS : TVFS; var fl : TFileList; sDestPath:String);
var
arbRadioButtonArray : array [0..8] of TRadioButton;
@ -74,7 +74,7 @@ uses
var
CurrentVFS : TVFS;
procedure ShowPackFilesForm(var VFS : TVFS; var fl: TFileList; sDestPath:String);
procedure ShowPackFilesForm(VFS : TVFS; var fl: TFileList; sDestPath:String);
begin
with TPackDlg.Create(nil) do
begin

View file

@ -912,13 +912,13 @@ end;
//-------------------------------------------------------------
function FDriveSupportsSymlinks(const fn: WideString): boolean;
var
disk: char;
disk: pchar;
buf1, buf2: array[0..50] of char;
Serial, NameLen, Flags: DWORD;
begin
Result:= false;
if (fn='') or (Pos(':\', fn)<>2) then Exit;
disk:= char(fn[1]);
disk:= pchar(fn[1]);
FillChar(buf1, SizeOf(buf1), 0);
FillChar(buf2, SizeOf(buf2), 0);
if GetVolumeInformation(PChar(disk+':\'), @buf1, SizeOf(buf1),

View file

@ -22,6 +22,7 @@ interface
uses
Classes, SysUtils, Graphics;
function GetDirs (var DirName : String; var Dirs : TStrings) : Longint;
function GetAbsoluteFileName(sPath, sRelativeFileName : String) : String;
function ExtractOnlyFileName(const FileName: string): string;
Function cnvFormatFileSize(iSize:Int64):String;
@ -35,6 +36,36 @@ implementation
uses
uGlobs, uVFSUtil;
{
DirName is split in a list of directory names,
Dirs is an TStrings.
The function returns the number of directories found, or -1
if none were found.
DirName must contain only PathDelim as Directory separator chars.
}
function GetDirs (var DirName : String; var Dirs : TStrings) : Longint;
Var
I : Longint;
len : Integer;
begin
I:= 1;
Result:= -1;
dirs.Clear;
len := Length(DirName);
While I <= len do
begin
If DirName[I]=PathDelim then
begin
Inc(Result);
dirs.Add(Copy(DirName, 1, len - (len - I)));
end;
Inc(I);
end;
If Result > -1 then inc(Result);
end;
function GetAbsoluteFileName(sPath, sRelativeFileName : String) : String;
var
iPos : Integer;