summaryrefslogtreecommitdiff
path: root/bgrep.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bgrep.cpp')
-rw-r--r--bgrep.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/bgrep.cpp b/bgrep.cpp
index b3ff324..82c62f9 100644
--- a/bgrep.cpp
+++ b/bgrep.cpp
@@ -1,34 +1,34 @@
-#include <stdio.h>
-#include <stdlib.h>
-#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 <stdio.h>
+#include <stdlib.h>
+#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