src/stdlib/llstrcmp.c
/*===================================================
 * widecmp -- Perform unicode string comparison, if available
 *=================================================*/
- Perform unicode string comparison, if available
- Perform unicode string comparison if available
static BOOLEAN
widecmp (CNSTRING str1, CNSTRING str2, INT *rtn)
{
	ZSTR zws1=0, zws2=0;
	BOOLEAN success = FALSE;
#ifdef HAVE_WCSCOLL
	zws1 = makewide(str1);
	if (zws1) {
		zws2 = makewide(str2);
	}
	if (zws1 && zws2) {
		const wchar_t * wfs1 = (const wchar_t *)zs_str(zws1);
		const wchar_t * wfs2 = (const wchar_t *)zs_str(zws2);
		*rtn = wcscoll(wfs1, wfs2);
		success = TRUE;
	}
#else
	str1=str1; 
	str2=str2; 
	rtn=rtn; 
#endif 
	zs_free(&zws1);
	zs_free(&zws2);
	return success;
}
static BOOLEAN widecmp ( CNSTRING str1 , CNSTRING str2 , INT * rtn ) { ZSTR zws1 = 0 , zws2 = 0 ; BOOLEAN success = FALSE ; #ifdef HAVE_WCSCOLL zws1 = makewide ( str1 ) ; if ( zws1 ) { zws2 = makewide ( str2 ) ; } if ( zws1 && zws2 ) { const wchar_t * wfs1 = ( const wchar_t * ) zs_str ( zws1 ) ; const wchar_t * wfs2 = ( const wchar_t * ) zs_str ( zws2 ) ; * rtn = wcscoll ( wfs1 , wfs2 ) ; success = TRUE ; } #else str1 = str1 ; str2 = str2 ; rtn = rtn ; #endif zs_free ( & zws1 ) ; zs_free ( & zws2 ) ; return success ; }
widecmp -- Perform unicode string comparison, if available
widecmp -- Perform unicode string comparison if available
/* convert to wchar_t & use wide compare (wcscoll) */ /* unused */ /* unused */ /* unused */ /* HAVE_WCSCOLL */