Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2003-12

Re: about dos.pp in WIN32

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

I've noticed that SysUtils is implemented on many platforms

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

OK, I don't see this before

Show quoted text 11 lines
- 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.

This is main, about what I think, rest is not so important, unit DOS is finished and is not need to rebuild everything

Best regards

Darek

Reply by email

Darek Mazur

Hi

1. small bug
TWin32Handle should be cardinal

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)

all this need changes in DOS.PP, UNIX.PP, FINA.INC

then code will be simpler

Darek

Reply by email

Unknown author
to Darek Mazur

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

Reply by email