예제 #1
0
파일: misc.c 프로젝트: ClaudioVZ/crengine
void
vPrintUnicode(const char *szFile, int iLine, const UCHAR *aucUni, size_t tLen)
{
	char	*szASCII;

	fail(tLen % 2 != 0);

	tLen /= 2;	/* Length in bytes to length in characters */
	szASCII = xmalloc(tLen + 1);
	(void)unincpy(szASCII, aucUni, tLen);
	szASCII[tLen] = '\0';
	(void)fprintf(stderr, "%s[%3d]: %.*s\n",
				szFile, iLine, (int)tLen, szASCII);
	szASCII = xfree(szASCII);
} /* end of vPrintUnicode */
예제 #2
0
wchar_t *wcsncpy( wchar_t *_wc1, const wchar_t *_wc2, size_t n )
{ return (wchar_t *)unincpy((unicode_t *)_wc1, (const unicode_t *)_wc2, n ); }