return filename_from_str(data);
}
+char filename_char_sanitise(char c)
+{
+ if (strchr("<>:\"/\\|?*", c))
+ return '.';
+ return c;
+}
+
#ifndef NO_SECUREZEROMEMORY
/*
* Windows implementation of smemclr (see misc.c) using SecureZeroMemory.
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
msgtext, lenof(msgtext)-1, NULL)) {
sprintf(msgtext,
- "(unable to format: FormatMessage returned %d)",
- GetLastError());
+ "(unable to format: FormatMessage returned %u)",
+ (unsigned int)GetLastError());
} else {
int len = strlen(msgtext);
if (len > 0 && msgtext[len-1] == '\n')