From d38e80ee04afe582e70150d3884e56c05f3fd7a8 Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 27 Nov 2004 21:44:44 +0000 Subject: Large dos2unix commit... --- VP/decomp-slz.cpp | 126 +++++++++++++++++++++++++++--------------------------- 1 file changed, 63 insertions(+), 63 deletions(-) (limited to 'VP/decomp-slz.cpp') 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 -#include - -#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 +#include + +#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 -- cgit v1.2.3