1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-28 00:01:53 +03:00

[pzstd] Make CLI compatible with zstd

This commit is contained in:
Nick Terrell
2016-09-21 14:29:47 -07:00
parent 60038948e6
commit 254c5b1692
9 changed files with 1017 additions and 299 deletions

View File

@ -19,16 +19,14 @@ using namespace pzstd;
int main(int argc, const char** argv) {
Options options;
if (!options.parse(argc, argv)) {
switch (options.parse(argc, argv)) {
case Options::Status::Failure:
return 1;
case Options::Status::Message:
return 0;
default:
break;
}
ErrorHolder errorHolder;
pzstdMain(options, errorHolder);
if (errorHolder.hasError()) {
std::fprintf(stderr, "Error: %s.\n", errorHolder.getError().c_str());
return 1;
}
return 0;
return pzstdMain(options);
}