From 358ce38db5041f8f6d9945d9e1ced77ea686c94c Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Fri, 15 Apr 2022 11:19:32 +0100 Subject: [PATCH] rename _ma to _ms (metadata symbol) --- README.md | 9 ++++++++- shell/m.cpp | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a209f9a..ad873f0 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ symbol followed by a space (to distinguish from constants like `#3`): 4143c: e5 10 mov #16,r5 # r5 = 0x00000010 ``` -## Reporting issues and results +## Contributing issues, results, and code Any bug reports, issues and improvement suggestions are welcome. See the [bug tracker](/Lephenixnoir/fxos/issues). @@ -155,3 +155,10 @@ If you have reverse-engineering results so share, the best place to do so is on the [Planète Casio bible](https://bible.planet-casio.com). Ping me or Breizh_craft on the Planète Casio shoutbox to have an SSH access set up for you. + +PRs are also most welcome. Before submitting code, make sure to run +`clang-format` to avoid any editor/configuration mishaps: + +```sh +% clang-format -i include/**/*.h lib/**/*.cpp shell/**/*.cpp +``` diff --git a/shell/m.cpp b/shell/m.cpp index 444ba3f..dc0c4a0 100644 --- a/shell/m.cpp +++ b/shell/m.cpp @@ -2,10 +2,10 @@ #include "shell.h" //--- -// ma +// ms //--- -static FxOS::Symbol parse_ma(Session &, Parser &parser) +static FxOS::Symbol parse_ms(Session &, Parser &parser) { Token t = parser.expect({T::NUM, T::SYSCALL}); @@ -22,20 +22,20 @@ static FxOS::Symbol parse_ma(Session &, Parser &parser) return s; } -void _ma(Session &session, Symbol s) +void _ms(Session &session, Symbol s) { if(!session.current_space) return; session.current_space->symbols.add(s); } -static ShellCommand _ma_cmd( - "ma", [](Session &s, Parser &p) { _ma(s, parse_ma(s, p)); }, - [](Session &s, Parser &p) { parse_ma(s, p); }, "Metadata Add", R"( -ma +static ShellCommand _ms_cmd( + "ms", [](Session &s, Parser &p) { _ms(s, parse_ms(s, p)); }, + [](Session &s, Parser &p) { parse_ms(s, p); }, "Metadata Symbol", R"( +ms Defines a new symbol at the specified address or syscall number in the current -virtual space. If a syscall number is provided, the address is not resolved; the -same syscall symbol can be used accross multiple OS versions regardless of where -the functions are actually located. +virtual space. If a syscall number is provided, the address is not resolved; +the same syscall symbol can be used across multiple OS versions regardless of +where the functions are actually located. )");