summaryrefslogtreecommitdiff
path: root/bgrep.cpp
diff options
context:
space:
mode:
authorpixel <pixel>2004-11-27 21:44:15 +0000
committerpixel <pixel>2004-11-27 21:44:15 +0000
commit50f0dd331f8168fb5b2cd60c70178fad627b7fb6 (patch)
tree65fcec7bd507791f0db8a3af1b60ad9ac631f4a7 /bgrep.cpp
parentf1df76865d1751469deff19e62255d50a814f183 (diff)
Large dos2unix commit...
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