[Proj] Modern C functions

Gerald I. Evenden geraldi.evenden at gmail.com
Sat Feb 28 09:28:06 PST 2009


On Saturday 28 February 2009 11:54:04 am support.mn at elisanet.fi wrote:
> Hi,
>
> The latest MSVC environments they would like people to use safe string
> functions and usually issue several warnings during compilation. In UNICODE
	etc, etc. ...
>>continue,
> these functions return _NLSCMPERROR and set errno to EINVAL. "
>
> What a mess might somebody think?  :)
>
> Regards: Janne.
Amen!

And from a previous response I made off this list:

I think some have forgotten a serious problem: what about Chinese and Kenji?

Sorry to be so un-PC but to quote Rhett Butler's response to 
Scarlett:  "Frankly my dear.  I don't give a damn."  :-)

This has gone way too far beyond my original question about the availability 
of str[n]casecmp.  All code I write is strictly designed with "Basic Latin" 
as the character set---nothing more, nothing less.  Documentation is internal 
to the code and is in fractured American English in that same character set.  
Please limit complaints to split infinitives, dangling whatevers and such.
-----------------------

Thought for today: how do you sort Chinese when making the Beijing phone book?
------------------------
PS: I will probably include my quick version in the geodesy library if 
installer cannot find routine in local library (the n is a simple update):

#include <ctype.h>
        int
strcasecmp(const char *s1, const char *s2) {
        int ret = 0;

        while (*s1 && *s2 && (ret = tolower(*s1++) - tolower(*s2++))) ;
        return ret ? (ret < 0 ? -1 : 1):0;
}
Ahhh, something more to pick on.  ;-)

Sheeeshhh!
-- 
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist



More information about the Proj mailing list