Makes a copy of the given error message (and decoded according to the * currently locale) into the wide string pointer pointed by error_str. * The last stored error string is freed. * Use register_error_str(NULL) to free the error message completely. */
| 128 | * The last stored error string is freed. |
| 129 | * Use register_error_str(NULL) to free the error message completely. */ |
| 130 | static void register_error_str(wchar_t **error_str, const char *msg) |
| 131 | { |
| 132 | free(*error_str); |
| 133 | *error_str = utf8_to_wchar_t(msg); |
| 134 | } |
| 135 | |
| 136 | /* Semilar to register_error_str, but allows passing a format string with va_list args into this function. */ |
| 137 | static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args) |
no test coverage detected