From 604162acdf5283a9759c1b3ce9e90887a6599ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 29 Sep 2013 21:11:30 +0200 Subject: Turn pack200 into an actual library --- depends/pack200/anti200.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 depends/pack200/anti200.cpp (limited to 'depends/pack200/anti200.cpp') diff --git a/depends/pack200/anti200.cpp b/depends/pack200/anti200.cpp new file mode 100644 index 00000000..3dfdb5dc --- /dev/null +++ b/depends/pack200/anti200.cpp @@ -0,0 +1,28 @@ +/* + * This is trivial. Do what thou wilt with it. Public domain. + */ + +#include +#include +#include "unpack200.h" + +int main(int argc, char **argv) +{ + if (argc == 3) + { + try + { + unpack_200(argv[1], argv[2]); + } + catch (std::runtime_error &e) + { + std::cerr << "Bad things happened: " << e.what() << std::endl; + return EXIT_FAILURE; + } + return EXIT_SUCCESS; + } + else + std::cerr << "Simple pack200 unpacker!" << std::endl << "Run like this:" << std::endl + << " " << argv[0] << " input.jar.lzma output.jar" << std::endl; + return EXIT_FAILURE; +} -- cgit v1.2.3