src/stdlib/llstrcmp.c
/*===================================================
 * ll_strcmploc -- Compare two strings with locale
 * which is to say, either Finnish build (hard-coded compare)
 * or user-specified custom sort
 * or locale info if available (HAVE_STRCOLL)
 * Created: 2001/07/21 (Perry Rapp)
 *=================================================*/
- Compare two strings with locale
which is to say, either Finnish build (hard-coded compare)
or user-specified custom sort
or locale info if available (HAVE_STRCOLL)
Created: 2001/07/21 (Perry Rapp)
- Compare two strings with locale which is to say either Finnish build ( hard - coded compare ) or user - specified custom sort or locale info if available ( HAVE_STRCOLL ) Created : 2001 / 07 / 21 ( Perry Rapp )
int
ll_strcmploc (const char *str1, const char *str2)
{
	INT rtn;
	if (opt_finnish)
		return(MY_STRCMP(str1, str2));
	if (usersort && (*usersort)(str1, str2, &rtn))
		return rtn;
	if (widecmp(str1, str2, &rtn))
		return rtn;
#ifdef HAVE_STRCOLL
	errno = 0;
	rtn = strcoll(str1, str2); 
	return !errno ? rtn : strcmp(str1, str2);
#else
	return(strcmp(str1, str2));
#endif
}
int ll_strcmploc ( const char * str1 , const char * str2 ) { INT rtn ; if ( opt_finnish ) return ( MY_STRCMP ( str1 , str2 ) ) ; if ( usersort && ( * usersort ) ( str1 , str2 , & rtn ) ) return rtn ; if ( widecmp ( str1 , str2 , & rtn ) ) return rtn ; #ifdef HAVE_STRCOLL errno = 0 ; rtn = strcoll ( str1 , str2 ) ; return ! errno ? rtn : strcmp ( str1 , str2 ) ; #else return ( strcmp ( str1 , str2 ) ) ; #endif }
ll_strcmploc -- Compare two strings with locale
 which is to say, either Finnish build (hard-coded compare)
 or user-specified custom sort
 or locale info if available (HAVE_STRCOLL)
 Created: 2001/07/21 (Perry Rapp)
ll_strcmploc -- Compare two strings with locale which is to say either Finnish build ( hard - coded compare ) or user - specified custom sort or locale info if available ( HAVE_STRCOLL ) Created : 2001 / 07 / 21 ( Perry Rapp )
/* special Finnish version */ /* user-defined collation */ /* regular wchar.h implementation, if available */ /* regular 8-bit strcoll */ /* sets errno if fails */ /* last ditch fallback is simple strcmp 8-bit numerical order */