Commit 6af0312c authored by Steve Lhomme's avatar Steve Lhomme

mkvalidator: handle non-latin command-line characters on windows

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@835 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent b5f0ebcb
2012-08-26
version 0.4.1:
- handle non-latin command-line characters on windows
2012-05-13
version 0.4.0:
- better differentiation between errors (will not play/not following specs) and warnings
......
......@@ -866,7 +866,11 @@ static int CheckCueEntries(ebml_master *Cues)
return Result;
}
#if defined(TARGET_WIN) && defined(UNICODE)
int wmain(int argc, const wchar_t *argv[])
#else
int main(int argc, const char *argv[])
#endif
{
int Result = 0;
int ShowUsage = 0;
......@@ -906,7 +910,11 @@ int main(int argc, const char *argv[])
for (i=1;i<argc;++i)
{
Node_FromStr(&p,Path,TSIZEOF(Path),argv[i]);
#if defined(TARGET_WIN) && defined(UNICODE)
Node_FromWcs(&p,Path,TSIZEOF(Path),argv[i]);
#else
Node_FromStr(&p,Path,TSIZEOF(Path),argv[i]);
#endif
if (tcsisame_ascii(Path,T("--no-warn"))) Warnings = 0;
else if (tcsisame_ascii(Path,T("--live"))) Live = 1;
else if (tcsisame_ascii(Path,T("--details"))) Details = 1;
......@@ -935,7 +943,11 @@ int main(int argc, const char *argv[])
goto exit;
}
Node_FromStr(&p,Path,TSIZEOF(Path),argv[argc-1]);
#if defined(TARGET_WIN) && defined(UNICODE)
Node_FromWcs(&p,Path,TSIZEOF(Path),argv[argc-1]);
#else
Node_FromStr(&p,Path,TSIZEOF(Path),argv[argc-1]);
#endif
Input = StreamOpen(&p,Path,SFLAG_RDONLY/*|SFLAG_BUFFERED*/);
if (!Input)
{
......
CON mkvalidator
{
PROJECT_NAME "mkvalidator"
PROJECT_VERSION 0.4.0
PROJECT_VERSION 0.4.1
PROJECT_VENDOR "Matroska"
USE matroska2
SOURCE mkvalidator.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment