Re: Possible eval builtin speedup?
Jan Schampera wrote: > Yea, I didn't look close enough. My fault. Ok, I found the problem: xdupmbstowcs (in file /lib/glob/xmbsrtowcs.c) is painfully slow, because of very frequent calls to realloc. I think this could be optimized. Nevertheless, I don't really understand the purpose of this function. Is it supposed to bypass a bug in mbsrtowcs (defined in wchar.h), as said in the following commentaries? /* xmbsrtowcs.c -- replacement function for mbsrtowcs */ /* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to U<0x5c>. So, this function is made for converting 0x5c to U<0x5c>. */ If so, why isn't it corrected to wchar.h? Regards, Nicolas
Re: Possible eval builtin speedup?
Nicolas wrote: Jan Schampera wrote: Yea, I didn't look close enough. My fault. Ok, I found the problem: xdupmbstowcs (in file /lib/glob/xmbsrtowcs.c) is painfully slow, because of very frequent calls to realloc. I think this could be optimized. You're probably right, and I see at least one way that could be done. I will happily accept any contributions to speed it up. Nevertheless, I don't really understand the purpose of this function. Is it supposed to bypass a bug in mbsrtowcs (defined in wchar.h), as said in the following commentaries? /* xmbsrtowcs.c -- replacement function for mbsrtowcs */ /* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to U<0x5c>. So, this function is made for converting 0x5c to U<0x5c>. */ If so, why isn't it corrected to wchar.h? I don't really understand this question. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/
Re: Possible eval builtin speedup?
Thanks for your answer. > > Nevertheless, I don't really understand the purpose of this function. > > Is it supposed to bypass a bug in mbsrtowcs (defined in wchar.h), as > > said in the following commentaries? > > /* xmbsrtowcs.c -- replacement function for mbsrtowcs */ > > /* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to > U<0x5c>. > >So, this function is made for converting 0x5c to U<0x5c>. */ > > If so, why isn't it corrected to wchar.h? > > > I don't really understand this question. What is the role of xmbsrtowcs? Why doesn't mbsrtowcs convert 0x5c to U<0x5c>?
Re: Possible eval builtin speedup?
Nicolas <[EMAIL PROTECTED]> writes: > What is the role of xmbsrtowcs? Why doesn't mbsrtowcs convert 0x5c to U<0x5c>? SHIFT-JIS defines 0x5c to be the Yen sign . Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Re: Possible eval builtin speedup?
Nicolas wrote: I don't really understand this question. What is the role of xmbsrtowcs? Why doesn't mbsrtowcs convert 0x5c to U<0x5c>? I see. I assume that it's a bug in mbsrtowcs. (If you check, xmbsrtowcs isn't used anywhere, so the question is moot.) Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/