Considering that mate.c is a script, and will probably deal with CLI args (#11) some kind of locale support is required?
What if filenames are not in ASCI?
main() received argc, argv in current Code Page on windows, which may be a lossy conversion. CLI should be parsed with UTF16 (or convert it to UTF8) with GetCommandLine() or smth like that.
Maybe just doing everything in UTF8 on windows is fine. But to avoid problems with CLI it may be useful to hide argc + argv from user completely with something like this
// hides StartBuild(), ParseCLI(), EndBuild()
MATE_SCRIPT() {
CreateExecutable()
AddFile()
InstallExecutable()
}
#define MATE_SCRIPT() \
void mate_main(void); \
int main(...) { __StartBuild(argc, argv); mate_main(); __EndBuild(); } \
void mate_main(void)
Considering that mate.c is a script, and will probably deal with CLI args (#11) some kind of locale support is required?
What if filenames are not in ASCI?
main() received argc, argv in current Code Page on windows, which may be a lossy conversion. CLI should be parsed with UTF16 (or convert it to UTF8) with GetCommandLine() or smth like that.
Maybe just doing everything in UTF8 on windows is fine. But to avoid problems with CLI it may be useful to hide argc + argv from user completely with something like this