From 38d60726082b04e79edae1c8c797c6dcb8314504 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 25 Aug 2002 14:39:48 +0000 Subject: Workiiiiiiiiiiiiiiiiiing!!!! --- bgrep.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bgrep.cpp') diff --git a/bgrep.cpp b/bgrep.cpp index 30be341..8759907 100644 --- a/bgrep.cpp +++ b/bgrep.cpp @@ -1,22 +1,22 @@ #include #include -#include "fileutils.h" +#include "Input.h" #define THRESHOLD 20480 int main(int argc, char ** argv) { unsigned int p = strtol(argv[1], 0, 0); char * fn = argv[2]; - FILE * f = fopen(fn, "r+"); + Handle * f = new Input(fn); if (!f) { printf("Bleeh.\n"); exit(-1); } - int l = filesize(f), i; + int l = f->GetSize(), i; char * b = (char *) malloc(l); - fread(b, 1, l, f); + f->read(b, l); for (i = 0; i < l - 3; i++) { unsigned int r = *((unsigned int *) &(b[i])); @@ -25,5 +25,5 @@ int main(int argc, char ** argv) { } } - fclose(f); + delete f; } -- cgit v1.2.3