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 */
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 ); }