Skip to content

Commit

Permalink
Renamed cmd_reset to prevent collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Spacehuhn committed Jun 14, 2022
1 parent f3f7959 commit 37d6e51
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SimpleCLI",
"version": "1.1.3",
"version": "1.1.4",
"keywords": "cli, parser, command, line, interface",
"description": "Add a command line interface to your project the easy way",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SimpleCLI
version=1.1.3
version=1.1.4
author=Spacehuhn
maintainer=Spacehuhn Technologies <[email protected]>
sentence=A Command Line Interface Library for Arduino
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleCLI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void SimpleCLI::parse(const char* str, size_t len) {

cmd_error_destroy(e);

cmd_reset(h);
cmd_reset_cli(h);

h = h->next;
}
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleCLI.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "CommandError.h" // CommandError, Command, Argument

#define SIMPLECLI_VERSION "1.1.3"
#define SIMPLECLI_VERSION "1.1.4"
#define SIMPLECLI_VERSION_MAJOR 1
#define SIMPLECLI_VERSION_MINOR 1
#define SIMPLECLI_VERSION_REVISION 3
Expand Down
8 changes: 4 additions & 4 deletions src/c/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ cmd* cmd_add_arg(cmd* c, arg* a) {
}

// Reset CMD
void cmd_reset(cmd* c) {
void cmd_reset_cli(cmd* c) {
if (c) {
if (c->mode == CMD_BOUNDLESS) {
arg_destroy_rec(c->arg_list);
Expand All @@ -174,10 +174,10 @@ void cmd_reset(cmd* c) {
}
}

void cmd_reset_rec(cmd* c) {
void cmd_reset_cli_rec(cmd* c) {
if (c) {
cmd_reset(c);
cmd_reset_rec(c->next);
cmd_reset_cli(c);
cmd_reset_cli_rec(c->next);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/c/cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ cmd* cmd_push(cmd* l, cmd* c, int max_size);
cmd* cmd_add_arg(cmd* c, arg* a);

// Reset CMD
void cmd_reset(cmd* c);
void cmd_reset_rec(cmd* c);
void cmd_reset_cli(cmd* c);
void cmd_reset_cli_rec(cmd* c);

// Comparisons
int cmd_name_equals(cmd* c, const char* name, size_t name_len, int case_sensetive);
Expand Down

0 comments on commit 37d6e51

Please sign in to comment.