[Proj] Modern C functions

Frank Warmerdam warmerdam at pobox.com
Thu Feb 26 12:31:47 EST 2009


Gerald I. Evenden wrote:
 >Frank wrote:
>> My experience has been that all POSIX environments have these functions,
>> but that Win32 (aka MSVC) instead uses strnicmp() and stricmp() to do the
>> same thing.  I've lived with macros like:
>>
>> #ifndef EQUAL
>> #if defined(WIN32) || defined(WIN32CE)
>> #  define EQUALN(a,b,n)           (strnicmp(a,b,n)==0)
>> #  define EQUAL(a,b)              (stricmp(a,b)==0)
>> #else
>> #  define EQUALN(a,b,n)           (strncasecmp(a,b,n)==0)
>> #  define EQUAL(a,b)              (strcasecmp(a,b)==0)
>> #endif
>> #endif
> 
> It is pointless to make a tirade against a sebaceous entity seeking world 
> domination, the embodiment of "Big Brother", but I cannot imagine who, what 
> or why the "i" means in the name stricmp.

Gerald,

I believe is stands for "insensitive" which applies to the case comparison
and their level of respect for developers trying build portable applications.

> Sigh!

Indeed!

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Proj mailing list