diff --git a/.github/workflows/aunit_tests.yml b/.github/workflows/aunit_tests.yml
index 76d7b59..bd2ff57 100644
--- a/.github/workflows/aunit_tests.yml
+++ b/.github/workflows/aunit_tests.yml
@@ -13,7 +13,7 @@ jobs:
- name: Setup
run: |
cd ..
- git clone https://github.com/bxparks/UnixHostDuino
+ git clone https://github.com/bxparks/EpoxyDuino
git clone https://github.com/bxparks/AUnit
git clone https://github.com/bxparks/AceCommon
git clone https://github.com/bxparks/AceRoutine
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 10305e0..6d90ca7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,13 @@
# Changelog
* Unreleased
+* 0.4.1 (2021-01-22)
+ * Convert `SHIFT_ARGC_ARGV()` macro in `src/cli/CommandHandler.h` to
+ an inlined static function `CommandHandler::shiftArgcArgv()` using
+ references. I forgot that I was programming in C++ when I created the
+ macro. Add `SHIFT_ARGC_ARGV()` function for backwards compatibility.
+ * Update UnixHostDuino 0.4 to EpoxyDuino 0.5.
+ * No functional change in this release.
* 0.4 (2020-12-09)
* update `AceUtilsCrcEeprom.h`
* Replace FastCRC with AceCRC library for a reduction of 4-5 kB of flash
diff --git a/README.md b/README.md
index a47d7e1..97a1fe9 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ AceTime, AceRoutine, etc) or third party libraries.
* Depends on:
* (none)
-**Version**: 0.4 (2020-12-09)
+**Version**: 0.4.1 (2021-01-22)
**Changelog**: [CHANGELOG.md](CHANGELOG.md)
@@ -115,7 +115,7 @@ It should work with [PlatformIO](https://platformio.org/) but I have
not tested it.
Many utilities work on Linux or MacOS (using both g++ and clang++ compilers)
-using the [UnixHostDuino](https://github.com/bxparks/UnixHostDuino) emulation
+using the [EpoxyDuino](https://github.com/bxparks/EpoxyDuino) emulation
layer.
### Operating System
diff --git a/docs/doxygen.cfg b/docs/doxygen.cfg
index 1f5c41d..cdeee53 100644
--- a/docs/doxygen.cfg
+++ b/docs/doxygen.cfg
@@ -38,7 +38,7 @@ PROJECT_NAME = "AceUtils"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 0.4
+PROJECT_NUMBER = 0.4.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/docs/html/AceUtilsCli_8h_source.html b/docs/html/AceUtilsCli_8h_source.html
index bd392d3..800c14a 100644
--- a/docs/html/AceUtilsCli_8h_source.html
+++ b/docs/html/AceUtilsCli_8h_source.html
@@ -22,7 +22,7 @@
|
AceUtils
- 0.4
+ 0.4.1
Useful Arduino utilties which are too small as separate libraries, but complex enough to be shared among multiple projects, and often have external dependencies to other libraries.
|
@@ -207,12 +207,12 @@
-ace_common::FCString getName() const
Return the name of the command.
-Signature for a command handler.
+ace_common::FCString getName() const
Return the name of the command.
+Signature for a command handler.
void findAndRunCommand(const char *cmd, int argc, const char *const *argv) const
Find and run the given command.
void runCommand(char *line) const
Tokenize the given line and run the command handler.
static void printHelp(Print &printer, const CommandHandler *command)
Print help string for the given command.
-ace_common::FCString getHelpString() const
Return the help string of the command.
+ace_common::FCString getHelpString() const
Return the help string of the command.
void helpCommandHandler(Print &printer, int argc, const char *const *argv) const
Handle the 'help' command.
void helpAll(Print &printer) const
Print help on all commands.
virtual void run(Print &printer, int argc, const char *const *argv) const =0
Run the command.
diff --git a/docs/html/CommandDispatcher_8h_source.html b/docs/html/CommandDispatcher_8h_source.html
index 5c0ddfa..2e8d926 100644
--- a/docs/html/CommandDispatcher_8h_source.html
+++ b/docs/html/CommandDispatcher_8h_source.html
@@ -22,7 +22,7 @@
|
AceUtils
- 0.4
+ 0.4.1
Useful Arduino utilties which are too small as separate libraries, but complex enough to be shared among multiple projects, and often have external dependencies to other libraries.
|
@@ -210,8 +210,8 @@
-ace_common::FCString getName() const
Return the name of the command.
-Signature for a command handler.
+ace_common::FCString getName() const
Return the name of the command.
+Signature for a command handler.
void findAndRunCommand(const char *cmd, int argc, const char *const *argv) const
Find and run the given command.
void runCommand(char *line) const
Tokenize the given line and run the command handler.
static void printHelp(Print &printer, const CommandHandler *command)
Print help string for the given command.
diff --git a/docs/html/CommandHandler_8h_source.html b/docs/html/CommandHandler_8h_source.html
index 05df59f..c514ea7 100644
--- a/docs/html/CommandHandler_8h_source.html
+++ b/docs/html/CommandHandler_8h_source.html
@@ -22,7 +22,7 @@
|
AceUtils
- 0.4
+ 0.4.1
Useful Arduino utilties which are too small as separate libraries, but complex enough to be shared among multiple projects, and often have external dependencies to other libraries.
|
@@ -102,56 +102,65 @@
- 39 #define SHIFT_ARGC_ARGV(argc, argv) do { argc--; argv++; } while (false)
-
-
-
-
-
-
- 64 virtual void run(Print& printer,
int argc,
const char*
const* argv)
-
-
- 68 ace_common::FCString
getName()
const {
return mName; }
-
-
-
-
- 75 static bool isArgEqual(
const char* arg,
const char* token) {
- 76 return strcmp(arg, token) == 0;
-
-
- 80 static bool isArgEqual(
const char* arg,
const __FlashStringHelper* token) {
- 81 return strcmp_P(arg, (
const char*) token) == 0;
-
-
-
-
- 87 mHelpString(helpString) {}
-
-
- 91 const __FlashStringHelper* helpString):
-
- 93 mHelpString(helpString) {}
-
-
- 96 ace_common::FCString
const mName;
- 97 ace_common::FCString
const mHelpString;
-
-
-
-
+
+
+
+
+
+ 55 virtual void run(Print& printer,
int argc,
const char*
const* argv)
+
+
+ 59 ace_common::FCString
getName()
const {
return mName; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 83 static bool isArgEqual(
const char* arg,
const char* token) {
+ 84 return strcmp(arg, token) == 0;
+
+
+ 88 static bool isArgEqual(
const char* arg,
const __FlashStringHelper* token) {
+ 89 return strcmp_P(arg, (
const char*) token) == 0;
+
+
+
+
+ 95 mHelpString(helpString) {}
+
+
+ 99 const __FlashStringHelper* helpString):
+
+ 101 mHelpString(helpString) {}
-
+
+ 104 ace_common::FCString
const mName;
+ 105 ace_common::FCString
const mHelpString;
+
+
+
+
+
+
-static bool isArgEqual(const char *arg, const __FlashStringHelper *token)
Test for equality when token is in PROGMEM.
-ace_common::FCString getName() const
Return the name of the command.
-Signature for a command handler.
-CommandHandler(const __FlashStringHelper *name, const __FlashStringHelper *helpString)
Constructor.
-ace_common::FCString getHelpString() const
Return the help string of the command.
-static bool isArgEqual(const char *arg, const char *token)
Test for equality against token.
-CommandHandler(const char *name, const char *helpString)
Constructor.
+static bool isArgEqual(const char *arg, const __FlashStringHelper *token)
Test for equality when token is in PROGMEM.
+ace_common::FCString getName() const
Return the name of the command.
+static void SHIFT_ARGC_ARGV(int &argc, const char *const *&argv)
Backwards compatibility with previous macro implementation .
+Signature for a command handler.
+CommandHandler(const __FlashStringHelper *name, const __FlashStringHelper *helpString)
Constructor.
+ace_common::FCString getHelpString() const
Return the help string of the command.
+static bool isArgEqual(const char *arg, const char *token)
Test for equality against token.
+CommandHandler(const char *name, const char *helpString)
Constructor.
virtual void run(Print &printer, int argc, const char *const *argv) const =0
Run the command.
+static void shiftArgcArgv(int &argc, const char *const *&argv)
Increment argv and decrement argc so that it appears as if the command line arguments are shifted to ...