mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 10:40:13 +02:00
* FileCreate(string,mode) overload added
This commit is contained in:
parent
c0c6ad57f3
commit
1ac1f644da
@ -108,6 +108,12 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
Function FileCreate (Const FileName : String; Mode:longint) : Longint;
|
||||
begin
|
||||
FileCreate:=FileCreate(FileName);
|
||||
end;
|
||||
|
||||
|
||||
Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
|
||||
var
|
||||
regs : registers;
|
||||
@ -724,7 +730,10 @@ Finalization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.10 2002-09-07 16:01:19 peter
|
||||
Revision 1.11 2003-01-03 20:41:04 peter
|
||||
* FileCreate(string,mode) overload added
|
||||
|
||||
Revision 1.10 2002/09/07 16:01:19 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
Revision 1.9 2002/05/09 08:42:24 carl
|
||||
|
@ -61,6 +61,7 @@ Const
|
||||
|
||||
Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
|
||||
Function FileCreate (Const FileName : String) : Longint;
|
||||
Function FileCreate (Const FileName : String; Mode : Integer) : Longint;
|
||||
Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
|
||||
Function FileWrite (Handle : Longint; const Buffer; Count : Longint) : Longint;
|
||||
Function FileSeek (Handle,FOffset,Origin : Longint) : Longint;
|
||||
@ -83,7 +84,10 @@ Function FileSearch (Const Name, DirList : String) : String;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 2002-09-07 16:01:22 peter
|
||||
Revision 1.7 2003-01-03 20:41:04 peter
|
||||
* FileCreate(string,mode) overload added
|
||||
|
||||
Revision 1.6 2002/09/07 16:01:22 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
}
|
||||
|
@ -284,6 +284,12 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
Function FileCreate (Const FileName : String; Mode:longint) : Longint;
|
||||
begin
|
||||
FileCreate:=FileCreate(FileName);
|
||||
end;
|
||||
|
||||
|
||||
function FileRead (Handle: longint; var Buffer; Count: longint): longint;
|
||||
assembler;
|
||||
asm
|
||||
@ -952,7 +958,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.19 2002-11-18 19:51:00 hajny
|
||||
Revision 1.20 2003-01-03 20:41:04 peter
|
||||
* FileCreate(string,mode) overload added
|
||||
|
||||
Revision 1.19 2002/11/18 19:51:00 hajny
|
||||
* another bunch of type corrections
|
||||
|
||||
Revision 1.18 2002/09/23 17:42:37 hajny
|
||||
|
@ -61,6 +61,21 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
Function FileCreate (Const FileName : String;Mode : Longint) : Longint;
|
||||
|
||||
Var LinuxFlags : longint;
|
||||
|
||||
BEGIN
|
||||
LinuxFlags:=0;
|
||||
Case (Mode and 3) of
|
||||
0 : LinuxFlags:=LinuxFlags or Open_RdOnly;
|
||||
1 : LinuxFlags:=LinuxFlags or Open_WrOnly;
|
||||
2 : LinuxFlags:=LinuxFlags or Open_RdWr;
|
||||
end;
|
||||
FileCreate:=fdOpen(FileName,LinuxFlags or Open_Creat or Open_Trunc);
|
||||
end;
|
||||
|
||||
|
||||
Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
|
||||
|
||||
begin
|
||||
@ -466,7 +481,10 @@ end.
|
||||
{
|
||||
|
||||
$Log$
|
||||
Revision 1.13 2002-09-07 16:01:28 peter
|
||||
Revision 1.14 2003-01-03 20:41:04 peter
|
||||
* FileCreate(string,mode) overload added
|
||||
|
||||
Revision 1.13 2002/09/07 16:01:28 peter
|
||||
* old logs removed and tabs fixed
|
||||
|
||||
Revision 1.12 2002/01/25 16:23:03 peter
|
||||
|
@ -83,6 +83,12 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
Function FileCreate (Const FileName : String; Mode:longint) : Longint;
|
||||
begin
|
||||
FileCreate:=FileCreate(FileName);
|
||||
end;
|
||||
|
||||
|
||||
Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
|
||||
Var
|
||||
res : dword;
|
||||
@ -664,7 +670,10 @@ Finalization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.18 2003-01-01 20:56:57 florian
|
||||
Revision 1.19 2003-01-03 20:41:04 peter
|
||||
* FileCreate(string,mode) overload added
|
||||
|
||||
Revision 1.18 2003/01/01 20:56:57 florian
|
||||
+ added invalid instruction exception
|
||||
|
||||
Revision 1.17 2002/12/15 20:24:17 peter
|
||||
|
Loading…
Reference in New Issue
Block a user