[Proj] Modern C functions

Eric Miller EMiller at dfg.ca.gov
Thu Feb 26 09:09:21 PST 2009


Windows recognizes strncmp, but has stricmp and strnicmp instead of strcasecmp and strncasecmp.

int stricmp(const char *, const char *);
int strnicmp(const char *, const char *, size_t);


>>> On 2/26/2009 at 7:35 AM, "Gerald I. Evenden" <geraldi.evenden at gmail.com>
wrote:
> This is a quick probe of the programming types in this group.
> 
> In finalizing Rel. 2.0 of geodesic and libgeodesy I ran across functions 
> under 
> the <string.h> heading which are not in the typical (read Harrison & Steele) 
> library references: strcasecmp and strncasecmp.  These are noted in the Gnu 
> man.3 as Posix 2001 standard routines.  Obviously, these two routines 
> replace 
> strcmp and strncmp and make comparisons case independent.
> 
> As soon as I became aware of them I have included them to eliminate the 
> nasty, 
> nasty fact of having to shift when typing in WGS84 and can now use 
> ellps=wgs84.
> 
> A little net browsing has yielded mixed results as to how well know these 
> functions are.
> 
> Thus my question here is: do non-Gnu C compilers used by this audience 
> recognize these functions?




More information about the Proj mailing list