From 18fe552a770093601fc490a72043272322ab59b0 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 3 Jan 2017 13:09:10 -0500 Subject: [PATCH] proper headers --- disassembler.cpp | 3 +- dumpobj.cpp | 1 + link.cpp | 114 +++++++++++++++++++++++------------------------ 3 files changed, 60 insertions(+), 58 deletions(-) diff --git a/disassembler.cpp b/disassembler.cpp index a7a3e30..5a88086 100644 --- a/disassembler.cpp +++ b/disassembler.cpp @@ -1,6 +1,7 @@ #include "disassembler.h" #include - +#include +#include static constexpr const char opcodes[] = "brkoracoporatsboraaslora" diff --git a/dumpobj.cpp b/dumpobj.cpp index 8b70c04..831e926 100644 --- a/dumpobj.cpp +++ b/dumpobj.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/link.cpp b/link.cpp index 9ad6aae..ff9efb1 100644 --- a/link.cpp +++ b/link.cpp @@ -1,58 +1,58 @@ -/* - * WDC to OMF Linker. - * - * - */ - -#include -#include -#include -#include - -void help() { - exit(0); -} - -void usage() { - exit(EX_USAGE); -} - -int main(int argc, char **argv) { - - std::string _o; - bool _C = false; - bool _X = false; - - std::vector _l; - std::vector _L; - - - int c; - while ((c = getopt(argc, argv, "CXL:l:o:")) != -1) { - switch(c) { - case 'X': _X = true; break; - case 'C': _C = true; break; - case 'o': _o = optarg; break; - case 'l': _l.emplace_back(optarg); break; - case 'L': _L.emplace_back(optarg); break; - case 'h': help(); break; - case ':': - case '?': - default: - usage(); - } - } - - argc -= optind; - argv += optind; - - if (argc == 0) usage(); - -} - - - -struct section { - std::vector data; - uint32_t offset; +/* + * WDC to OMF Linker. + * + * + */ + +#include +#include +#include +#include + +void help() { + exit(0); +} + +void usage() { + exit(EX_USAGE); +} + +int main(int argc, char **argv) { + + std::string _o; + bool _C = false; + bool _X = false; + + std::vector _l; + std::vector _L; + + + int c; + while ((c = getopt(argc, argv, "CXL:l:o:")) != -1) { + switch(c) { + case 'X': _X = true; break; + case 'C': _C = true; break; + case 'o': _o = optarg; break; + case 'l': _l.emplace_back(optarg); break; + case 'L': _L.emplace_back(optarg); break; + case 'h': help(); break; + case ':': + case '?': + default: + usage(); + } + } + + argc -= optind; + argv += optind; + + if (argc == 0) usage(); + +} + + + +struct section { + std::vector data; + uint32_t offset; } \ No newline at end of file