* \ingroup baselib * fprintf wrapper function that takes UTF-8 strings as input * (on all platforms) and does what is necessary to output * strings in the correct encoding (UTF-8 on Unix and * UTF-16 on Windows). * * @param fd File to print to * @param msg printf message */
| 83 | * @param msg printf message |
| 84 | */ |
| 85 | void |
| 86 | tsk_fprintf(FILE * fd, const char *msg, ...) |
| 87 | { |
| 88 | va_list args; |
| 89 | va_start(args, msg); |
| 90 | |
| 91 | #ifdef TSK_WIN32 |
| 92 | { |
| 93 | WCHAR wbuf[2048]; |
| 94 | tsk_printf_conv(wbuf, 2048, msg, &args); |
| 95 | fwprintf(fd, _TSK_T("%s"), wbuf); |
| 96 | } |
| 97 | #else |
| 98 | vfprintf(fd, msg, args); |
| 99 | #endif |
| 100 | va_end(args); |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * \ingroup baselib |