Re: more m4 underquotations

2007-02-14 Thread Eric Blake
> > If you prefer some other quoting style (e.g., maximal quoting or > > quadrigraphs, but rather not changequote) > > There is an important property that programming languages should have: > the ability to copy and paste a piece of code from one place to another. > > [[...]] doesn't have this pr

Re: strcasecmp

2007-02-14 Thread Paolo Bonzini
Paul Eggert wrote: Bruno Haible <[EMAIL PROTECTED]> writes: It works fine if at least one argument is ASCII _and_ the locale is not a Turkish locale. Thanks for mentioning this. I didn't know that property of Turkish. However, I'm not sure how Turkish people would do lowercase translation

Re: strcasecmp

2007-02-14 Thread Bruno Haible
Paolo Bonzini wrote: > I'm not sure how Turkish people would do lowercase translation > of English words. In other words, I'm not sure if they'd write the > hypothetical language Iris as İRİS or ırıs. This is one question to ask. The other consideration is: If a script contains an invocation "

Re: strcasecmp

2007-02-14 Thread Paolo Bonzini
This consideration points to using (a) c_strcasecmp (a, b) or (b) c_strcasecmp (a, b) || mbscasecmp (a, b). If your Turkish friend says he would write "ırıs", then it points to (b). If not, i.e. if such a word is not considered like a Turkish word, it points to (a). I haven't asked ye

Re: more m4 underquotations

2007-02-14 Thread Bruno Haible
Bruce Korb wrote (in a discussion about how to avoid m4 underquotation bugs): > The complexity stems from both the m4 language choice and > the brevity of the chosen quote markers. The language issue > is that macros inherit the quote markers from their invocation > environment. Nothing you can d

Re: more m4 underquotations

2007-02-14 Thread Eric Blake
> > The complexity stems from both the m4 language choice and > > the brevity of the chosen quote markers. The language issue > > is that macros inherit the quote markers from their invocation > > environment. Nothing you can do about that. (Too late to > > choose another language without starti

remove strcasecmp from regex code; use localcharset instead

2007-02-14 Thread Paul Eggert
I installed this. It adds a dependency of regex on localcharset, which I'd rather avoid, but the alternatives seemed worse to me. 2007-02-14 Paul Eggert <[EMAIL PROTECTED]> Fix regex code so it doesn't rely on strcasecmp. * lib/regex_internal.h: Include only if _LIBC is define

fix 'exclude' module to avoid strcasecmp, but with performance problems

2007-02-14 Thread Paul Eggert
I installed the following to fix the 'exclude' module to avoid strcasecmp, and to modernize it to support FNM_EXTMATCH. However, here I had some performance problems with mbscasemcp. Given two multibyte strings A and B, I want to know whether A is an initial prefix of B, ignoring case during comp

Re: remove strcasecmp from regex code; use localcharset instead

2007-02-14 Thread Bruno Haible
Paul Eggert wrote: > I installed this. It adds a dependency of regex on localcharset, Thanks. This improves regex on - Mingw, which doesn't have nl_langinfo(CODESET) and where the locale is usually set through system settings, not through environment variables, - Cygwin, where nl_langinfo

new module mbsncasecmp

2007-02-14 Thread Bruno Haible
This introduces a function mbsncasecmp(), which is like strncasecmp() except that it works with characters instead of bytes and the count argument N is the number of characters, not the number of bytes. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> New module mbsncasecmp. * module

new module mbspcasecmp

2007-02-14 Thread Bruno Haible
Most of the uses of strncasecmp are for the purpose of testing whether a string is prefix of another string. Using mbsncasecmp() is not comfortable for this case. I'm adding a new function mbspcasecmp() for this purpose. The 'p' stands for "prefix" or "pointer". 2007-02-14 Bruno Haible <[EMAIL

Re: strcasecmp

2007-02-14 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > Paolo Bonzini wrote: >> I'm not sure how Turkish people would do lowercase translation >> of English words. In other words, I'm not sure if they'd write the >> hypothetical language Iris as İRİS or ırıs. > > This is one question to ask. The other consi

Re: fix 'exclude' module to avoid strcasecmp, but with performance problems

2007-02-14 Thread Bruno Haible
Paul Eggert wrote: > However, here I had some performance problems with mbscasemcp. Given > two multibyte strings A and B, I want to know whether A is an initial > prefix of B, ignoring case during comparison; also, if A is a prefix > of B, I need to know where in B the prefix ends (because I want

Re: strcasecmp

2007-02-14 Thread Paolo Bonzini
The only reason for the case-insensitive comparison here is support for Windows-like file names, right? So the issue is not worth our worrying about (except perhaps as a warning that we should avoid case-insensitive comparison whenever we can :-). Not really. It's an option name, and options a