From 38d60726082b04e79edae1c8c797c6dcb8314504 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 25 Aug 2002 14:39:48 +0000 Subject: Workiiiiiiiiiiiiiiiiiing!!!! --- dtemain.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'dtemain.cpp') diff --git a/dtemain.cpp b/dtemain.cpp index c044c79..ec60509 100644 --- a/dtemain.cpp +++ b/dtemain.cpp @@ -21,28 +21,28 @@ #include #include #include -#include "fileutils.h" +#include "Input.h" #include "generic.h" #include "dte.h" int main(int argc, char ** argv) { - FILE * f, * t; + Handle * f, * t; long old_size; int i; verbosity = M_INFO; printm(M_STATUS, "Reading thingy table\n"); - t = fopen(argv[2], "r"); + t = new Input(argv[2]); read_thingy(t); - fclose(t); + delete t; - f = fopen(argv[1], "r"); - dte_text_size = filesize(f); + f = new Input(argv[1]); + dte_text_size = f->GetSize(); dte_text = (char *) calloc(dte_text_size + 4, 1); printm(M_STATUS, "Reading file, size = %li\n", dte_text_size); read_thingy_file(f); - fclose(f); + delete f; printm(M_STATUS, "True size = %li\n", old_size = dte_text_size); @@ -50,11 +50,11 @@ int main(int argc, char ** argv) { dte_compress(); printm(M_STATUS, "Rereading file.\n"); - f = fopen(argv[1], "r"); - dte_text_size = filesize(f); + f = new Input(argv[1]); + dte_text_size = f->GetSize(); dte_text = (char *) calloc(dte_text_size + 4, 1); read_thingy_file(f); - fclose(f); + delete f; printm(M_STATUS, "True size = %li, real gain = %li\n", dte_text_size, old_size - dte_text_size); -- cgit v1.2.3