[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH 2/5] Pascal-RTL: Implementierung von Do_FileSize
+ Pascal-RTL: Do_FileSize()
Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
src/modules/pas/lib/rtl/sysfile.inc | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/modules/pas/lib/rtl/sysfile.inc b/src/modules/pas/lib/rtl/sysfile.inc
index ca2ac75..7546c97 100644
--- a/src/modules/pas/lib/rtl/sysfile.inc
+++ b/src/modules/pas/lib/rtl/sysfile.inc
@@ -62,10 +62,14 @@ begin
Do_SeekEnd := c_fseek(f, 0, SEEK_END);
end;
-Function Do_FileSize(Handle:thandle): Longint;
+Function Do_FileSize(f: THandle): Longint;
+var
+ curpos: TSize;
begin
- { TODO }
- Do_FileSize := 0;
+ curpos := Do_FilePos(f);
+ Do_SeekEnd(f);
+ Do_FileSize := Do_FilePos(f);
+ Do_Seek(f, curpos);
end;
Procedure Do_Open(var f; name: PChar; flags: longint);
--
1.6.0.2