diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2013-03-21 19:18:49 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2013-03-29 21:25:59 +1100 |
commit | 5705b4d7b2c3c5311138e9f4b66658c51f3cc22b (patch) | |
tree | e96ada937e8b57189f211fea9bfd47ae1688676f /src/utils/flacdiff | |
parent | 9b8fdafe3a4ba0b6272bdcb0161f921bf750ca49 (diff) | |
download | flac-5705b4d7b2c3c5311138e9f4b66658c51f3cc22b.tar.gz |
Huge Windows utf8 I/O patch.
Patch from Janne Hyvärinen <cse@sci.fi>.
Diffstat (limited to 'src/utils/flacdiff')
-rw-r--r-- | src/utils/flacdiff/flacdiff.vcproj | 80 | ||||
-rw-r--r-- | src/utils/flacdiff/main.cpp | 11 |
2 files changed, 89 insertions, 2 deletions
diff --git a/src/utils/flacdiff/flacdiff.vcproj b/src/utils/flacdiff/flacdiff.vcproj index b5c7d39b..a945e263 100644 --- a/src/utils/flacdiff/flacdiff.vcproj +++ b/src/utils/flacdiff/flacdiff.vcproj @@ -170,6 +170,86 @@ Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="Release (UTF8)|Win32"
+ OutputDirectory="..\..\..\objs\release\bin"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories=".;..\..\..\include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;FLAC__NO_DLL;FLAC__STRINGS_IN_UTF8"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4267;4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\..\objs\release\lib\libogg_static.lib"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames="uuid.lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
diff --git a/src/utils/flacdiff/main.cpp b/src/utils/flacdiff/main.cpp index d4c8f066..7ce89105 100644 --- a/src/utils/flacdiff/main.cpp +++ b/src/utils/flacdiff/main.cpp @@ -189,11 +189,11 @@ static bool run(const char *fn1, const char *fn2) AutoFILE f1(fn1, "rb"), f2(fn2, "rb"); if(!f1) { - fprintf(stderr, "ERROR: opening %s for reading\n", fn1); + flac_fprintf(stderr, "ERROR: opening %s for reading\n", fn1); return false; } if(!f2) { - fprintf(stderr, "ERROR: opening %s for reading\n", fn2); + flac_fprintf(stderr, "ERROR: opening %s for reading\n", fn2); return false; } @@ -209,6 +209,13 @@ int main(int argc, char *argv[]) { const char *usage = "usage: flacdiff flacfile1 flacfile2\n"; +#ifdef FLAC__STRINGS_IN_UTF8 + if (get_utf8_argv(&argc, &argv) != 0) { + fprintf(stderr, "%ERROR: failed to convert command line parameters to UTF-8\n"); + return 1; + } +#endif + if(argc > 1 && 0 == strcmp(argv[1], "-h")) { printf(usage); return 0; |