From d38e80ee04afe582e70150d3884e56c05f3fd7a8 Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 27 Nov 2004 21:44:44 +0000 Subject: Large dos2unix commit... --- bgrep.cpp | 66 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'bgrep.cpp') diff --git a/bgrep.cpp b/bgrep.cpp index 82c62f9..b3ff324 100644 --- a/bgrep.cpp +++ b/bgrep.cpp @@ -1,34 +1,34 @@ -#include -#include -#include "Input.h" -#include "Main.h" - -#define THRESHOLD 20480 - -CODE_BEGINS -virtual int startup() throw (GeneralException) { - unsigned int p = strtol(argv[1], 0, 0); - char * fn = argv[2]; - Handle * f = new Input(fn); - - if (!f) { - printf("Bleeh.\n"); - exit(-1); - } - int l = f->GetSize(), i; - char * b = (char *) malloc(l); - - f->read(b, l); - - for (i = 0; i < l - 3; i++) { - unsigned int r = *((unsigned int *) &(b[i])); - if (r == p) { - printf("Found 0x%08x at %i = 0x%08x in %s\n", p, i, i, fn); - } - } - - delete f; - - return 0; -} +#include +#include +#include "Input.h" +#include "Main.h" + +#define THRESHOLD 20480 + +CODE_BEGINS +virtual int startup() throw (GeneralException) { + unsigned int p = strtol(argv[1], 0, 0); + char * fn = argv[2]; + Handle * f = new Input(fn); + + if (!f) { + printf("Bleeh.\n"); + exit(-1); + } + int l = f->GetSize(), i; + char * b = (char *) malloc(l); + + f->read(b, l); + + for (i = 0; i < l - 3; i++) { + unsigned int r = *((unsigned int *) &(b[i])); + if (r == p) { + printf("Found 0x%08x at %i = 0x%08x in %s\n", p, i, i, fn); + } + } + + delete f; + + return 0; +} CODE_ENDS \ No newline at end of file -- cgit v1.2.3