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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user