Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-10-07
22:02 • Closed ticket [925620ffff]: Impure generic/platform code splitting plus 7 ot... artifact: 6a8f38533e user: vincentdarley
2004-10-02
08:08 • Ticket [925620ffff]: 4 changes artifact: d90b78d515 user: dgp
03:04 • Add attachment 925620.patch to ticket [925620ffff] artifact: 06447fe6ad user: dgp
03:04 • Ticket [925620ffff] Impure generic/platform code splitting status still Open... artifact: 89f6ca3a93 user: dgp
2004-10-01
00:23 • Ticket [925620ffff]: 4 changes artifact: 88c789b2a1 user: vincentdarley
00:22 • Add attachment fsGeneric.diff to ticket [925620ffff] artifact: fa1a0841c6 user: vincentdarley
00:22 • Ticket [925620ffff] Impure generic/platform code splitting status still Open... artifact: 2eae37c50b user: vincentdarley
00:22 • Ticket [925620ffff]: 4 changes artifact: d8d1acf7ae user: vincentdarley
2004-03-30
17:22 • Ticket [925620ffff]: 4 changes artifact: c6c941861a user: vincentdarley
2004-03-29
21:18 • New ticket [925620ffff]. artifact: 18cd668b4b user: dkf

Impure generic/platform code splitting

Closed / Fixed925620ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 22 years ago
Descriptionplain2004-03-29 21:18:06
When examining generic/tclIOUtil.c, I see a number of
references to things relating to Windows only. Would it
be possible to hive these things off behind a
TclpThingy interface?

At the same time, why is TclpNativeToNormalized defined
in that file at all?  That's a function that I'd expect
to be done exclusively by the platform-specific parts
of the core (for all that it is more work that way.) 
Perhaps we've actually got an error in the splitting of
functionality between functions if we need that much
common code in that function?

I make all these points because keeping different
platform-specific bits of the core separated from the
generic core makes for much cleaner code overall;
#ifdef-fery is often best characterised as an
obfuscation technique rather than a high-quality
programming paradigm...
vincentdarleyplain2004-03-30 17:22:31
Logged In: YES 
user_id=32170

I agree that we would be better with more platform specific
separation, and less #ifdef'ing.  I'd certainly support any
efforts to clean things up.
vincentdarleyplain2004-10-01 00:22:27
Logged In: YES 
user_id=32170

Attaching a proposed patch to remove #ifdef's and move the
code to the platform directories.
vincentdarleyplain2004-10-01 00:22:28
File Added - 103352: fsGeneric.diff
vincentdarleyplain2004-10-01 00:23:08
Logged In: YES 
user_id=32170

p.s. patch needs testing on Unix.  Works fine on Windows.
dgpplain2004-10-02 03:04:13
File Added - 103501: 925620.patch

Logged In: YES 
user_id=80530

revised patch tests ok on 
Linux/Alpha and Solaris

now to review the code...
dgpplain2004-10-02 08:08:36
Logged In: YES 
user_id=80530

also tests ok on Mac OS X
vincentdarleyplain2004-10-07 22:02:49
Logged In: YES 
user_id=32170

Updated patch for latest cvs HEAD changes, and applied.
Log in (anonymous is fine) to add a comment.

Attachments: