From: "Darek Mazur"
To:
Subject: [fpc-devel]about dos.pp in WIN32
Send reply to:
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).
Show quoted text 12 lines
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