[fpc-devel]about dos.pp in WIN32

XHajT03 at mbox.vol.cz XHajT03 at mbox.vol.cz
Thu Dec 18 22:04:03 CET 2003


From:           	"Darek Mazur" <darekm at emadar.com>
To:             	<fpc-devel at lists.freepascal.org>
Subject:        	[fpc-devel]about dos.pp in WIN32
Send reply to:  	fpc-devel at lists.freepascal.org
	<mailto:fpc-devel-request at lists.freepascal.org?subject=subscribe>
	<mailto:fpc-devel-request at lists.freepascal.org?subject=unsubscribe>
Date sent:      	Thu, 18 Dec 2003 21:13:57 +0100

Hi Derek

> 1. small bug
>   TWin32Handle should be cardinal

This one should probably be fixed, but I'll leave it up to somebody 
else who is actually using Win32 and thus can test the result (and 
fix possible problems).

> 2. My suggestion
>   DOS is (should be) only for compatibility with BP7 with old formula
> working with file, thus I think there are not need use it in others
> unit, specially not in SYSUTILS ,
>  only one function in SYSUTILS is used : FEXPAND
> there are many duplicated declaration (tWIN32fileTime is in Windows,
> several function etc)
> 
> for me:
>   DOS should use SYSUTILS (not SYSTUTILS use DOS)
>   FExpand call  ExpandFileName from SYSUTILS (this unit is use to
>   porting)

While I could agree to your opinion that SYSUTILS wouldn't have to 
use DOS, I don't agree with your conclusion that the opposite should 
be introduced instead. There are several good reasons not to do that, 
mentioning just a few of them:

- SysUtils is much more complex, i.e. more difficult to implement on 
new platforms than Dos.

- SysUtils does all string operations using ansistrings, which would 
degrade performance rapidly for all applications using Dos (including 
the compiler itself).

- SysUtils contains more code, which would notably increase size of 
binaries on platforms with no smartlinking support.


Having said all this, it might still be possible (and not so 
difficult, in fact) to remove SysUtils dependency on unit Dos, 
especially if the only re-used function is really FExpand (FExpand 
itself is implemented in a standalone include file anyway, after 
all). I'll discuss this with other core team members and possibly 
have a look at it afterwards.

Best regards

Tomas





More information about the fpc-devel mailing list