This cast from dchar to wchar is necessary as I fixed the fputwc* function declarations to take wchar_t (wchar on Windows, else dchar) characters instead of int. Not sure about the DMC runtime, so I left it alone (taking an int character).