diff options
author | pixel <pixel> | 2004-11-27 21:44:15 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-11-27 21:44:15 +0000 |
commit | 50f0dd331f8168fb5b2cd60c70178fad627b7fb6 (patch) | |
tree | 65fcec7bd507791f0db8a3af1b60ad9ac631f4a7 /VP/decomp-slz.cpp | |
parent | f1df76865d1751469deff19e62255d50a814f183 (diff) |
Large dos2unix commit...
Diffstat (limited to 'VP/decomp-slz.cpp')
-rw-r--r-- | VP/decomp-slz.cpp | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/VP/decomp-slz.cpp b/VP/decomp-slz.cpp index 076d3bd..a3ff9a1 100644 --- a/VP/decomp-slz.cpp +++ b/VP/decomp-slz.cpp @@ -1,63 +1,63 @@ -#include <stdio.h> -#include <stdlib.h> - -#include "lzss.h" -#include "Input.h" -#include "Output.h" -#include "Main.h" - -CODE_BEGINS -public: -Appli() : lzss_o(new lzss) {} -virtual ~Appli() { - delete lzss_o; -} -private: - -lzss * lzss_o; - -virtual int startup() throw (GeneralException) { - int sig, l, d, v; - Handle * fin = &Stdin, * fout = &Stdout; - - switch (argc) { - case 3: - fout = new Output(argv[2]); - case 2: - fin = new Input(argv[1]); - break; - case 1: - break; - default: - printm(M_BARE, "Usage: %s [filein] [fileout]\n", argv[0]); - return -1; - } - - verbosity = M_STATUS; - - fin->read(&sig, 4); - fin->read(&d, 4); - fin->read(&l, 4); - switch (sig) { - case 0x05a4c53: - printm(M_STATUS, "Detected a SLZ-type 0 file.\n"); - fin->read(&v, 4); - copy(fin, fout, d); - return 0; - case 0x15a4c53: - lzss_o->change_scheme(lzss_o->schemes[lzss_o->VP_1]); - printm(M_STATUS, "Detected a SLZ-type 1 file.\n"); - break; - case 0x25a4c53: - lzss_o->change_scheme(lzss_o->schemes[lzss_o->VP_2]); - printm(M_STATUS, "Detected a SLZ-type 2 file.\n"); - break; - default: - printm(M_ERROR, "Not a SLZ file.\n"); - return -1; - } - - lzss_o->lzss_decomp(fin, fout, l); - return 0; -} -CODE_ENDS +#include <stdio.h>
+#include <stdlib.h>
+
+#include "lzss.h"
+#include "Input.h"
+#include "Output.h"
+#include "Main.h"
+
+CODE_BEGINS
+public:
+Appli() : lzss_o(new lzss) {}
+virtual ~Appli() {
+ delete lzss_o;
+}
+private:
+
+lzss * lzss_o;
+
+virtual int startup() throw (GeneralException) {
+ int sig, l, d, v;
+ Handle * fin = &Stdin, * fout = &Stdout;
+
+ switch (argc) {
+ case 3:
+ fout = new Output(argv[2]);
+ case 2:
+ fin = new Input(argv[1]);
+ break;
+ case 1:
+ break;
+ default:
+ printm(M_BARE, "Usage: %s [filein] [fileout]\n", argv[0]);
+ return -1;
+ }
+
+ verbosity = M_STATUS;
+
+ fin->read(&sig, 4);
+ fin->read(&d, 4);
+ fin->read(&l, 4);
+ switch (sig) {
+ case 0x05a4c53:
+ printm(M_STATUS, "Detected a SLZ-type 0 file.\n");
+ fin->read(&v, 4);
+ copy(fin, fout, d);
+ return 0;
+ case 0x15a4c53:
+ lzss_o->change_scheme(lzss_o->schemes[lzss_o->VP_1]);
+ printm(M_STATUS, "Detected a SLZ-type 1 file.\n");
+ break;
+ case 0x25a4c53:
+ lzss_o->change_scheme(lzss_o->schemes[lzss_o->VP_2]);
+ printm(M_STATUS, "Detected a SLZ-type 2 file.\n");
+ break;
+ default:
+ printm(M_ERROR, "Not a SLZ file.\n");
+ return -1;
+ }
+
+ lzss_o->lzss_decomp(fin, fout, l);
+ return 0;
+}
+CODE_ENDS
|