MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / GetOutputStream

Function GetOutputStream

src/tools/CommandLineMain.cpp:230–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230FILE* GetOutputStream() {
231 if (outputFileName.IsNull()) {
232 SetBinaryMode(stdout);
233 return stdout;
234 } else {
235 FILE* fp = OpenFileUtf8(outputFileName.Get(), "wb");
236 if (!fp) {
237 throw FileNotWritable(outputFileName.Get());
238 }
239 return fp;
240 }
241}
242
243void PrintInteractiveStdinHint() {
244#ifdef _WIN32

Callers 15

ConvertLineByLineFunction · 0.85
ConvertFileFunction · 0.85
ConvertStdinFunction · 0.85
ReportRunsMethod · 0.85
PrintHeaderMethod · 0.85
PrintRunDataMethod · 0.85
ReportContextMethod · 0.85
PrintHeaderMethod · 0.85
PrintRunDataMethod · 0.85
ReportRunsMethod · 0.85
PrintRunDataMethod · 0.85
ReportContextMethod · 0.85

Calls 4

SetBinaryModeFunction · 0.85
OpenFileUtf8Function · 0.70
IsNullMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected