diff options
author | pixel <pixel> | 2004-11-27 21:44:44 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-11-27 21:44:44 +0000 |
commit | d38e80ee04afe582e70150d3884e56c05f3fd7a8 (patch) | |
tree | f2627c50fa22aea89447e8406ac418eb68650d3d /VP/decomp-slz.cpp | |
parent | 50f0dd331f8168fb5b2cd60c70178fad627b7fb6 (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 a3ff9a1..076d3bd 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 |