diff options
author | pixel <pixel> | 2004-11-27 21:44:44 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-11-27 21:44:44 +0000 |
commit | d38e80ee04afe582e70150d3884e56c05f3fd7a8 (patch) | |
tree | f2627c50fa22aea89447e8406ac418eb68650d3d /bgrep.cpp | |
parent | 50f0dd331f8168fb5b2cd60c70178fad627b7fb6 (diff) |
Large dos2unix commit...
Diffstat (limited to 'bgrep.cpp')
-rw-r--r-- | bgrep.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
@@ -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 |