* removed os.inc

This commit is contained in:
peter 1999-04-08 12:22:52 +00:00
parent 0ccfd1cb90
commit 93b9fd3102
19 changed files with 337 additions and 437 deletions

View File

@ -18,75 +18,122 @@
# spaces, or the makefile won't work anymore after you save.
#####################################################################
# Configuration section
# Makefile Defaults
#####################################################################
# Use smartlinking ?
ifndef SMARTLINK
SMARTLINK=NO
endif
# Name of library ?
# If this is set, all units will be put in the same library.
# If it is empty (default), the units will be left in separate files.
ifndef LIBNAME
LIBNAME=
#LIBNAME=fpc
endif
# Should the library be shared or static (only if LIBNAME is set).
# Set this to 'shared' or 'static' to create a librrary
# Setting this to shared will disable smart linking.
ifndef LIBTYPE
LIBTYPE=
#LIBTYPE=static
endif
#####################################################################
# Defaults
#####################################################################
# Default place of the makefile.fpc
DEFAULTFPCDIR=../..
# set target and cpu which are required
OS_TARGET=go32v1
CPU=i386
override OS_TARGET=go32v1
override CPU=i386
# Where are the include files
RTL=..
CFG=$(RTL)/cfg
INC=$(RTL)/inc
PROCINC=$(RTL)/$(CPU)
OBJPASDIR=$(RTL)/objpas
# Where are the results placed
# Where to place the result files
TARGETDIR=.
# These units belong to the RTL
UNITPREFIX=rtl
#####################################################################
# Own defaults
#####################################################################
# Paths
OBJPASDIR=$(RTL)/objpas
PPI=ppi
# Define Go32v1 Units
SYSTEMUNIT=system
# Loaders
LOADEROBJECTS=prt0
# Unit Objects
UNITOBJECTS=$(SYSTEMUNIT) strings go32 \
dos crt objects printer \
objpas sysutils math typinfo \
cpu mmx getopts heaptrc \
msmouse
#####################################################################
# Common targets
#####################################################################
.PHONY: all clean install info \
staticlib sharedlib libsclean \
staticinstall sharedinstall libinstall \
all: testfpcmake fpc_all
clean: testfpcmake fpc_clean
install: testfpcmake fpc_install
info: testfpcmake fpc_info
staticlib: testfpcmake fpc_staticlib
sharedlib: testfpcmake fpc_sharedlib
libsclean: testfpcmake fpc_libsclean
staticinstall: testfpcmake fpc_staticinstall
sharedinstall: testfpcmake fpc_sharedinstall
libinstall: testfpcmake fpc_libinstall
#####################################################################
# Include default makefile
#####################################################################
include $(CFG)/makefile.cfg
# test if FPCMAKE is still valid
ifdef FPCMAKE
ifeq ($(strip $(wildcard $(FPCMAKE))),)
FPCDIR=
FPCMAKE=
endif
endif
ifndef FPCDIR
ifdef DEFAULTFPCDIR
FPCDIR=$(DEFAULTFPCDIR)
endif
endif
#####################################################################
# System dependent
#####################################################################
ifndef FPCMAKE
ifdef FPCDIR
FPCMAKE=$(FPCDIR)/makefile.fpc
else
FPCMAKE=makefile.fpc
endif
endif
# Define Linux Units
SYSTEMPPU=system$(PPUEXT)
OBJECTS=strings go32 \
dos crt objects printer \
objpas sysutils typinfo math \
cpu mmx getopts heaptrc mouse
LOADERS=prt0
override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
ifeq ($(FPCMAKE),)
testfpcmake:
@echo makefile.fpc not found!
@echo Check the FPCMAKE and FPCDIR environment variables.
@exit
else
include $(FPCMAKE)
testfpcmake:
endif
#####################################################################
# Include system unit dependencies
#####################################################################
SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
# Get the system independent include file names.
# This will set the following variables :
# SYSINCNAMES
@ -104,38 +151,17 @@ SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
#####################################################################
# System independent Makefile
# Dependencies
#####################################################################
# Add Prefix and Suffixes
OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
.PHONY : all install clean \
libs libsclean \
diffs diffclean \
all : $(OBJLOADERS) $(PPUOBJECTS)
install : all
$(MKDIR) $(UNITINSTALLDIR)
$(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
clean :
-$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) $(PPAS) link.res log
-$(DELTREE) *$(SMARTEXT)
#####################################################################
# Files
#####################################################################
vpath %$(PASEXT) $(INC) $(PROCINC)
#
# Loaders
#
prt0$(OEXT) : prt0.as
as -o prt0$(OEXT) prt0.as
$(AS) -o prt0$(OEXT) prt0.as
#
# Base Units (System, strings, os-dependent-base-unit)
@ -144,13 +170,11 @@ prt0$(OEXT) : prt0.as
$(SYSTEMPPU) : system.pp $(SYSDEPS)
$(COMPILER) -Us -Sg system.pp $(REDIR)
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
$(SYSTEMPPU)
$(COMPILER) $(INC)/strings.pp $(REDIR)
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
$(SYSTEMPPU)
go32$(PPUEXT) : go32.pp $(SYSTEMPPU)
$(COMPILER) go32.pp $(REDIR)
#
# Delphi Object Model
@ -163,119 +187,36 @@ include $(OBJPASDIR)/makefile.op
# System Dependent Units
#
mouse$(PPUEXT) : mouse.pp $(SYSTEMPPU)
$(COMPILER) mouse.pp $(REDIR)
#
# TP7 Compatible RTL Units
#
dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
$(COMPILER) dos.pp $(REDIR)
crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
$(COMPILER) crt.pp $(REDIR)
objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
$(COMPILER) $(INC)/objects.pp $(REDIR)
printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
$(COMPILER) printer.pp $(REDIR)
#
# Other RTL Units
#
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
$(COMPILER) $(PROCINC)/cpu.pp $(REDIR)
mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
$(COMPILER) $(PROCINC)/mmx.pp $(REDIR)
getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
$(COMPILER) $(INC)/getopts.pp $(REDIR)
heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
$(COMPILER) $(INC)/heaptrc $(REDIR)
#####################################################################
# Libs
#####################################################################
staticlib:
make libsclean
make all SMARTLINK=YES LIBNAME=fpc LIBTYPE=static
sharedlib:
@echo Shared Libraries not supported for Go32v1
staticlibinstall: staticlib
$(MKDIR) $(STATIC_LIBINSTALLDIR)
$(MKDIR) $(STATIC_UNITINSTALLDIR)
$(INSTALLEXE) fpc$(STATICLIBEXT) $(STATIC_LIBINSTALLDIR)
$(INSTALL) *$(PPUEXT) *$(OEXT) $(STATIC_UNITINSTALLDIR)
sharedlibinstall: sharedlib
libinstall: staticlibinstall
libsclean : clean
-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
#####################################################################
# Default targets
#####################################################################
include $(CFG)/makefile.def
msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)
#
# $Log$
# Revision 1.5 1999-02-25 10:00:43 michael
# + Fixed type in strings target
# Revision 1.6 1999-04-08 12:22:52 peter
# * removed os.inc
#
# Revision 1.4 1999/02/25 07:39:21 michael
# * Joined strings and sysutils
#
# Revision 1.3 1999/01/15 11:47:12 peter
# + added math unit to objects
#
# Revision 1.2 1998/12/28 23:37:38 peter
# * clean target fix, theres no objpas dir to clean anymore
#
# Revision 1.1 1998/12/21 13:07:02 peter
# * use -FE
#
# Revision 1.9 1998/11/24 19:49:44 jonas
# + added warning about TABs
#
# Revision 1.8 1998/10/12 08:36:29 pierre
# * wrong 'objpas' target in all removed
#
# Revision 1.7 1998/10/11 13:45:04 michael
# + Added disk.inc to sysutils dependencies
#
# Revision 1.6 1998/10/11 12:21:47 michael
# + Further sysutils implementations.
#
# Revision 1.5 1998/10/06 22:10:29 peter
# + heaptrc
#
# Revision 1.4 1998/10/02 09:25:59 peter
# * fixed rtl path
#
# Revision 1.3 1998/09/16 16:47:26 peter
# * merged fixes
#
# Revision 1.1.2.2 1998/09/16 16:17:49 peter
# * updates to install with go32,win32
#
# Revision 1.2 1998/09/15 12:09:08 peter
# * merged updates
#
# Revision 1.1.2.1 1998/09/15 12:02:02 peter
# * updates to get objpas using its own makefile
#

View File

@ -15,48 +15,77 @@
**********************************************************************}
Function DiskFree (Drive : Byte) : Longint;
var
Regs: Registers;
begin
Regs.Dl := Drive;
Regs.Ah := $36;
intr($21, Regs);
if Regs.Ax <> $FFFF then
result := Regs.Ax * Regs.Bx * Regs.Cx
else
result := -1;
end;
Function DiskSize (Drive : Byte) : Longint;
var
Regs: Registers;
begin
Regs.Dl := Drive;
Regs.Ah := $36;
Intr($21, Regs);
if Regs.Ax <> $FFFF then
result := Regs.Ax * Regs.Cx * Regs.Dx
else
result := -1;
end;
Function GetCurrentDir : String;
begin
GetDir(0, result);
end;
Function SetCurrentDir (Const NewDir : String) : Boolean;
begin
{$I-}
ChDir(NewDir);
result := (IOResult = 0);
{$I+}
end;
Function CreateDir (Const NewDir : String) : Boolean;
begin
{$I-}
MkDir(NewDir);
result := (IOResult = 0);
{$I+}
end;
Function RemoveDir (Const Dir : String) : Boolean;
begin
{$I-}
RmDir(Dir);
result := (IOResult = 0);
{$I+}
end;
{
$Log$
Revision 1.1 1998-12-21 13:07:02 peter
* use -FE
$Log$
Revision 1.2 1999-04-08 12:22:53 peter
* removed os.inc
Revision 1.1 1998/10/11 13:42:55 michael
Added disk functions
Revision 1.1 1998/12/21 13:07:02 peter
* use -FE
}
Revision 1.2 1998/10/30 14:13:13 michael
+ Implementation of functions by Gertjan Schouten
Revision 1.1 1998/10/11 13:42:55 michael
Added disk functions
}

View File

@ -92,6 +92,12 @@ begin
end;
Function FileTruncate (Handle,Size: Longint) : boolean;
begin
//!! Needs implementing
end;
Function FileGetDate (Handle : Longint) : Longint;
begin
@ -141,15 +147,27 @@ begin
end;
Procedure GetLocalTime(var SystemTime: TSystemTime);
begin
end ;
{ ---------------------------------------------------------------------
Internationalization settings
---------------------------------------------------------------------}
procedure InitAnsi;
begin
end;
Procedure InitInternational;
begin
end;
{
$Log$
Revision 1.1 1998-12-21 13:07:02 peter
* use -FE
Revision 1.2 1998/10/12 08:02:56 michael
wrong file committed
Revision 1.1 1998/10/11 12:21:01 michael
Added file calls. Implemented for linux only
Revision 1.2 1999-04-08 12:22:54 peter
* removed os.inc
}

View File

@ -12,7 +12,7 @@
**********************************************************************
}
Unit Mouse;
Unit MSMouse;
Interface
{
@ -102,7 +102,7 @@ Var
Implementation
{$I386_ATT}
{$asmmode ATT}
Function InitMouse: Boolean;
begin
@ -387,39 +387,10 @@ End;
Begin
MouseFound := InitMouse;
End.
{
$Log$
Revision 1.1 1998-12-21 13:07:02 peter
* use -FE
Revision 1.1 1999-04-08 12:22:56 peter
* removed os.inc
Revision 1.5 1998/07/15 16:10:35 jonas
* new mouse uni
Revision 1.3 1998/04/05 13:56:54 peter
- fixed mouse to compile with $i386_att
+ linux crt supports redirecting (not Esc-codes anymore)
Revision 1.2 1998/03/26 12:25:22 peter
* integrated both mouse units
Revision 1.1.1.1 1998/03/25 11:18:41 root
* Restored version
Revision 1.4 1998/03/24 15:53:12 peter
* cleanup and doesn't give warnings when compiling
Revision 1.3 1998/01/26 11:56:24 michael
+ Added log at the end
Revision 1.2
date: 1997/12/01 12:15:45; author: michael; state: Exp; lines: +14 -12
+ added copyright reference in header.
Revision 1.1
date: 1997/11/27 08:33:49; author: michael; state: Exp;
Initial revision
Revision 1.1.1.1
date: 1997/11/27 08:33:49; author: michael; state: Exp; lines: +0 -0
FPC RTL CVS start
}

View File

@ -1,30 +0,0 @@
{
$Id$
This file is part of the Free Pascal run time library.
Copyright (c) 1993,97 by the Free Pascal development team.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$define go32v1}
{$undef go32v2}
{$undef os2}
{$undef linux}
{$undef win32}
{
$Log$
Revision 1.1 1998-12-21 13:07:02 peter
* use -FE
Revision 1.2 1998/05/22 00:39:31 peter
* go32v1, go32v2 recompiles with the new objects
* remake3 works again with go32v2
- removed some "optimizes" from daniel which were wrong
}

View File

@ -15,11 +15,6 @@
unit system;
interface
{ no stack check in system }
{$S-}
{$I os.inc}
{ include system-independent routine headers }
{$I systemh.inc}
@ -619,7 +614,10 @@ Begin
End.
{
$Log$
Revision 1.3 1999-01-18 10:05:49 pierre
Revision 1.4 1999-04-08 12:22:57 peter
* removed os.inc
Revision 1.3 1999/01/18 10:05:49 pierre
+ system_exit procedure added
Revision 1.2 1998/12/28 15:50:44 peter

View File

@ -15,78 +15,77 @@
**********************************************************************}
Function DiskFree (Drive : Byte) : Longint;
var Regs: Registers;
var
Regs: Registers;
begin
Regs.Dl := Drive;
Regs.Ah := $36;
intr($21, Regs);
if Regs.Ax <> $FFFF then
result := Regs.Ax * Regs.Bx * Regs.Cx
else
result := -1;
Regs.Dl := Drive;
Regs.Ah := $36;
intr($21, Regs);
if Regs.Ax <> $FFFF then
result := Regs.Ax * Regs.Bx * Regs.Cx
else
result := -1;
end;
Function DiskSize (Drive : Byte) : Longint;
var Regs: Registers;
var
Regs: Registers;
begin
Regs.Dl := Drive;
Regs.Ah := $36;
Intr($21, Regs);
if Regs.Ax <> $FFFF then
result := Regs.Ax * Regs.Cx * Regs.Dx
else
result := -1;
Regs.Dl := Drive;
Regs.Ah := $36;
Intr($21, Regs);
if Regs.Ax <> $FFFF then
result := Regs.Ax * Regs.Cx * Regs.Dx
else
result := -1;
end;
Function GetCurrentDir : String;
begin
GetDir(0, result);
GetDir(0, result);
end;
Function SetCurrentDir(Const NewDir : String) : Boolean;
Function SetCurrentDir (Const NewDir : String) : Boolean;
begin
{$I-}
ChDir(NewDir);
result := (IOResult = 0);
{$I+}
{$I-}
ChDir(NewDir);
result := (IOResult = 0);
{$I+}
end;
Function CreateDir (Const NewDir : String) : Boolean;
begin
{$I-}
MkDir(NewDir);
result := (IOResult = 0);
{$I+}
{$I-}
MkDir(NewDir);
result := (IOResult = 0);
{$I+}
end;
Function RemoveDir (Const Dir : String) : Boolean;
begin
{$I-}
RmDir(Dir);
result := (IOResult = 0);
{$I+}
{$I-}
RmDir(Dir);
result := (IOResult = 0);
{$I+}
end;
{
$Log$
Revision 1.1 1998-12-21 13:07:02 peter
* use -FE
$Log$
Revision 1.2 1999-04-08 12:22:58 peter
* removed os.inc
Revision 1.2 1998/10/30 14:13:13 michael
+ Implementation of functions by Gertjan Schouten
Revision 1.1 1998/12/21 13:07:02 peter
* use -FE
Revision 1.1 1998/10/11 13:42:55 michael
Added disk functions
Revision 1.2 1998/10/30 14:13:13 michael
+ Implementation of functions by Gertjan Schouten
Revision 1.1 1998/10/11 13:42:55 michael
Added disk functions
}

View File

@ -33,7 +33,7 @@ var
_emu_entry : emu_entry_type;
procedure _control87(mask1,mask2 : word);
procedure _control87(mask1,mask2 : longint);
begin
{ Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details }
{ from file cntrl87.s in src/libc/pc_hw/fpu }
@ -216,7 +216,10 @@ begin
end.
{
$Log$
Revision 1.2 1999-03-01 15:40:50 peter
Revision 1.3 1999-04-08 12:22:59 peter
* removed os.inc
Revision 1.2 1999/03/01 15:40:50 peter
* use external names
* removed all direct assembler modes

View File

@ -20,7 +20,6 @@ unit GRAPH;
{$R-}
{$Q-}
{ $DEFINE DEBUG}
{$I os.inc}
{$ifdef DEBUG}
{$define TEST_24BPP}
@ -1016,7 +1015,10 @@ end.
{
$Log$
Revision 1.3 1999-03-02 13:56:34 peter
Revision 1.4 1999-04-08 12:23:00 peter
* removed os.inc
Revision 1.3 1999/03/02 13:56:34 peter
* use ATT assembler in profile
* use AS output in graph

View File

@ -1,29 +0,0 @@
{
$Id$
This file is part of the Free Pascal run time library.
Copyright (c) 1993,97 by the Free Pascal development team.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$undef go32v1}
{$define go32v2}
{$undef os2}
{$undef linux}
{$undef win32}
{
$Log$
Revision 1.1 1998-12-21 13:07:03 peter
* use -FE
Revision 1.2 1998/05/31 14:18:27 peter
* force att or direct assembling
* cleanup of some files
}

View File

@ -11,12 +11,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{ no stack check in system }
{$S-}
unit system;
{$I os.inc}
interface
{ include system-independent routine headers }
@ -137,8 +132,7 @@ var
old_int00 : tseginfo;cvar;
old_int75 : tseginfo;cvar;
{$ASMMODE ATT}
{$asmmode ATT}
{*****************************************************************************
Go32 Helpers
@ -1228,7 +1222,10 @@ Begin
End.
{
$Log$
Revision 1.7 1999-03-10 22:15:28 florian
Revision 1.8 1999-04-08 12:23:02 peter
* removed os.inc
Revision 1.7 1999/03/10 22:15:28 florian
+ system.cmdline variable for go32v2 and win32 added
Revision 1.6 1999/03/01 15:40:52 peter

View File

@ -1,27 +0,0 @@
{
$Id$
This file is part of the Free Pascal run time library.
Copyright (c) 1993,97 by the Free Pascal development team.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$undef dos}
{$undef go32v2}
{$undef os2}
{$define linux}
{$undef win32}
{
$Log$
Revision 1.2 1998-05-06 12:38:22 michael
+ Removed log from before restored version.
Revision 1.1.1.1 1998/03/25 11:18:43 root
* Restored version
}

View File

@ -22,11 +22,7 @@
{ If you use an aout system, set the conditional AOUT}
{ $Define AOUT}
Unit SysLinux;
{$I os.inc}
Interface
{$ifdef m68k}
@ -738,7 +734,10 @@ End.
{
$Log$
Revision 1.22 1999-01-18 10:05:53 pierre
Revision 1.23 1999-04-08 12:23:04 peter
* removed os.inc
Revision 1.22 1999/01/18 10:05:53 pierre
+ system_exit procedure added
Revision 1.21 1998/12/28 15:50:49 peter

View File

@ -22,16 +22,17 @@ interface
uses
{$ifdef linux}
linux
{$else}
{$ifdef win32}
dos,windows
{$else}
{$ifdef go32v2}
dos,go32
{$endif go32v2}
{$endif win32}
{$endif linux}
;
{$endif}
{$ifdef win32}
windows,dos
{$endif}
{$ifdef go32v1}
go32,dos
{$endif}
{$ifdef go32v2}
go32,dos
{$endif}
;
type
@ -99,7 +100,7 @@ type
{ Read internationalization settings }
{$i sysinth.inc}
{ Read date & Time function declarations }
{$i datih.inc}
@ -278,7 +279,10 @@ begin
end.
{
$Log$
Revision 1.23 1999-02-28 13:17:37 michael
Revision 1.24 1999-04-08 12:23:05 peter
* removed os.inc
Revision 1.23 1999/02/28 13:17:37 michael
+ Added internationalization support and more format functions
Revision 1.22 1999/02/10 22:15:13 michael

View File

@ -4,7 +4,7 @@
Copyright (c) 1998 by the Free Pascal development team
Disk functions from Delphi's sysutils.pas
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
@ -14,46 +14,97 @@
**********************************************************************}
Function DiskFree (Drive : Byte) : Longint;
function GetDiskFreeSpace(drive:pchar;var sector_cluster,bytes_sector,
freeclusters,totalclusters:longint):longbool;
external 'kernel32' name 'GetDiskFreeSpaceA';
function diskfree(drive : byte) : longint;
var
disk : array[1..4] of char;
secs,bytes,
free,total : longint;
begin
if drive=0 then
begin
disk[1]:='\';
disk[2]:=#0;
end
else
begin
disk[1]:=chr(drive+64);
disk[2]:=':';
disk[3]:='\';
disk[4]:=#0;
end;
if GetDiskFreeSpace(@disk,secs,bytes,free,total) then
result:=free*secs*bytes
else
result:=-1;
end;
Function DiskSize (Drive : Byte) : Longint;
function disksize(drive : byte) : longint;
var
disk : array[1..4] of char;
secs,bytes,
free,total : longint;
begin
if drive=0 then
begin
disk[1]:='\';
disk[2]:=#0;
end
else
begin
disk[1]:=chr(drive+64);
disk[2]:=':';
disk[3]:='\';
disk[4]:=#0;
end;
if GetDiskFreeSpace(@disk,secs,bytes,free,total) then
result:=total*secs*bytes
else
result:=-1;
end;
Function GetCurrentDir : String;
begin
GetDir(0, result);
end;
Function SetCurrentDir (Const NewDir : String) : Boolean;
begin
{$I-}
ChDir(NewDir);
result := (IOResult = 0);
{$I+}
end;
Function CreateDir (Const NewDir : String) : Boolean;
begin
{$I-}
MkDir(NewDir);
result := (IOResult = 0);
{$I+}
end;
Function RemoveDir (Const Dir : String) : Boolean;
begin
{$I-}
RmDir(Dir);
result := (IOResult = 0);
{$I+}
end;
{
$Log$
Revision 1.1 1998-10-11 13:42:55 michael
Added disk functions
$Log$
Revision 1.2 1999-04-08 12:23:06 peter
* removed os.inc
}
Revision 1.1 1998/10/11 13:42:55 michael
Added disk functions
}

View File

@ -14,9 +14,6 @@
**********************************************************************}
unit dos;
{$I os.inc}
interface
{ Include Win32 Consts,Types }
@ -879,7 +876,10 @@ End;
end.
{
$Log$
Revision 1.13 1998-11-16 15:48:53 peter
Revision 1.14 1999-04-08 12:23:07 peter
* removed os.inc
Revision 1.13 1998/11/16 15:48:53 peter
* fixed longbool returns for api calls
Revision 1.12 1998/10/27 10:55:55 michael

View File

@ -114,8 +114,6 @@ Function FileAge (Const FileName : String): Longint;
var
Handle: THandle;
FindData: TWin32FindData;
LocalFileTime: TFileTime;
Fn : String;
begin
Handle := FindFirstFile(Pchar(FileName), @FindData);
@ -428,7 +426,10 @@ end;
{
$Log$
Revision 1.8 1999-03-18 16:15:59 michael
Revision 1.9 1999-04-08 12:23:09 peter
* removed os.inc
Revision 1.8 1999/03/18 16:15:59 michael
- Really removed debug statements
Revision 1.7 1999/03/16 21:01:00 peter

View File

@ -1,26 +0,0 @@
{
$Id$
This file is part of the Free Pascal run time library.
Copyright (c) 1993,97 by the Free Pascal development team
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$define win32}
{$undef go32v1}
{$undef go32v2}
{$undef os2}
{$undef linux}
{
$Log$
Revision 1.3 1998-06-10 10:39:16 peter
* working w32 rtl
}

View File

@ -14,25 +14,19 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$S-}
unit syswin32;
{$I os.inc}
interface
{ include system-independent routine headers }
{$ASMMODE ATT}
{$I systemh.inc}
{ include heap support headers }
{$I heaph.inc}
{$ifdef i386}
{$define Set_i386_Exception_handler}
{$endif i386}
{ include system-independent routine headers }
{$I systemh.inc}
{ include heap support headers }
{$I heaph.inc}
const
{ Default filehandles }
UnusedHandle : longint = -1;
@ -77,7 +71,6 @@ var
implementation
{ include system independent routines }
{$I system.inc}
@ -126,6 +119,9 @@ CONST
var
errno : longint;
{$ASMMODE ATT}
{ misc. functions }
function GetLastError : DWORD;
external 'kernel32' name 'GetLastError';
@ -1014,7 +1010,10 @@ end.
{
$Log$
Revision 1.36 1999-03-24 23:25:59 peter
Revision 1.37 1999-04-08 12:23:11 peter
* removed os.inc
Revision 1.36 1999/03/24 23:25:59 peter
* fixed file sharing
Revision 1.35 1999/03/12 00:07:48 pierre