Some functions are duplicated with their only difference being that one of them is wide character (W) and the other is ASCII (A). Of course it makes sense to convert one of them into the other and reuse the existing code. What I was wondering about, though is that, at least in the exmaple of files/profile.c the W functions are converting to A instead the other way around. Shouldn't we expect some problems with systems using wide characters or is this handled such that these characters are represented as more then one characters in ASCII? In Windows I'm pretty sure that A is always converted to W for such functions.
On Thu, 14 Feb 2002, Gerhard Gruber wrote:
Some functions are duplicated with their only difference being that one of them is wide character (W) and the other is ASCII (A). Of course it makes sense to convert one of them into the other and reuse the existing code. What I was wondering about, though is that, at least in the exmaple of files/profile.c the W functions are converting to A instead the other way around. Shouldn't we expect some problems with systems using wide characters or is this handled such that these characters are represented as more then one characters in ASCII? In Windows I'm pretty sure that A is always converted to W for such functions.
Yes, you are supposed to implement xxxA by calling xxxW and not the other way around. But historically, the xxxA functions have been implemented first and the xxxW came later. And it's easier to just call the xxxA function than to move all the code around to do things the right way.
Still, the xxxW -> xxxA instances need to be fixed and they, slowly, are. You are welcome to lend a hand.
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Good judgment comes from experience, and experience comes from bad judgment -- Barry LePatner
Francois Gouget wrote:
Yes, you are supposed to implement xxxA by calling xxxW and not the other way around. But historically, the xxxA functions have been implemented first and the xxxW came later. And it's easier to just call the xxxA function than to move all the code around to do things the right way.
Good to know. :)
Still, the xxxW -> xxxA instances need to be fixed and they, slowly, are. You are welcome to lend a hand.
Ah! Currently I'm busy with implementing the boot handling of files. Takes a bit longer than I expected because I can't devote as much time as I thought.