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 /PE/rebuildmenus.cpp | |
parent | 50f0dd331f8168fb5b2cd60c70178fad627b7fb6 (diff) |
Large dos2unix commit...
Diffstat (limited to 'PE/rebuildmenus.cpp')
-rw-r--r-- | PE/rebuildmenus.cpp | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/PE/rebuildmenus.cpp b/PE/rebuildmenus.cpp index bfbda61..681e909 100644 --- a/PE/rebuildmenus.cpp +++ b/PE/rebuildmenus.cpp @@ -1,76 +1,76 @@ -#include <Main.h>
-#include <Input.h>
-#include <Output.h>
-
-CODE_BEGINS
-virtual int startup(void) throw (GeneralException) {
- int i, j, p, s;
- Handle * inter = new Output("concat.out");
- Handle * f, * out;
- String fname;
-
- inter->writeU32(4);
-
- for (i = 0; i < 4; i++) {
- inter->writeU32(0);
- }
-
- for (i = 0; i < 4; i++) {
- fname = "menus" + String(i) + ".out";
- f = new Input(fname);
- s = f->GetSize();
-
- p = inter->tell();
-
- inter->seek(i * 4 + 4);
- inter->writeU32(p);
- inter->seek(0, SEEK_END);
-
- copy(f, inter);
-
- s &= 3;
-
- if (s) {
- s = 4 - s;
- for (j = 0; j < s; j++)
- inter->writeU8(0);
- }
-
- delete f;
- }
-
- delete inter;
-
- out = new Output("menus.bin");
- out->writeU32(11);
-
- for (i = 0; i < 11; i++) {
- out->writeU32(0);
- }
-
- for (i = 0; i < 11; i++) {
- if (i == 0) {
- fname = "concat.out";
- } else if (i < 10) {
- fname = "../../various/0001/0" + String(i) + ".out";
- } else {
- fname = "../../various/0001/10.out";
- }
- f = new Input(fname);
-
- p = out->tell();
-
- out->seek(i * 4 + 4);
- out->writeU32(p);
- out->seek(0, SEEK_END);
-
- copy(f, out);
-
- delete f;
- }
-
- delete out;
-
- return 0;
-}
-CODE_ENDS
+#include <Main.h> +#include <Input.h> +#include <Output.h> + +CODE_BEGINS +virtual int startup(void) throw (GeneralException) { + int i, j, p, s; + Handle * inter = new Output("concat.out"); + Handle * f, * out; + String fname; + + inter->writeU32(4); + + for (i = 0; i < 4; i++) { + inter->writeU32(0); + } + + for (i = 0; i < 4; i++) { + fname = "menus" + String(i) + ".out"; + f = new Input(fname); + s = f->GetSize(); + + p = inter->tell(); + + inter->seek(i * 4 + 4); + inter->writeU32(p); + inter->seek(0, SEEK_END); + + copy(f, inter); + + s &= 3; + + if (s) { + s = 4 - s; + for (j = 0; j < s; j++) + inter->writeU8(0); + } + + delete f; + } + + delete inter; + + out = new Output("menus.bin"); + out->writeU32(11); + + for (i = 0; i < 11; i++) { + out->writeU32(0); + } + + for (i = 0; i < 11; i++) { + if (i == 0) { + fname = "concat.out"; + } else if (i < 10) { + fname = "../../various/0001/0" + String(i) + ".out"; + } else { + fname = "../../various/0001/10.out"; + } + f = new Input(fname); + + p = out->tell(); + + out->seek(i * 4 + 4); + out->writeU32(p); + out->seek(0, SEEK_END); + + copy(f, out); + + delete f; + } + + delete out; + + return 0; +} +CODE_ENDS |