Skip to content

Commit 37d6e51

Browse files
author
Spacehuhn
committed
Renamed cmd_reset to prevent collisions
1 parent f3f7959 commit 37d6e51

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SimpleCLI",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"keywords": "cli, parser, command, line, interface",
55
"description": "Add a command line interface to your project the easy way",
66
"repository": {

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SimpleCLI
2-
version=1.1.3
2+
version=1.1.4
33
author=Spacehuhn
44
maintainer=Spacehuhn Technologies <[email protected]>
55
sentence=A Command Line Interface Library for Arduino

src/SimpleCLI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void SimpleCLI::parse(const char* str, size_t len) {
105105

106106
cmd_error_destroy(e);
107107

108-
cmd_reset(h);
108+
cmd_reset_cli(h);
109109

110110
h = h->next;
111111
}

src/SimpleCLI.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

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

12-
#define SIMPLECLI_VERSION "1.1.3"
12+
#define SIMPLECLI_VERSION "1.1.4"
1313
#define SIMPLECLI_VERSION_MAJOR 1
1414
#define SIMPLECLI_VERSION_MINOR 1
1515
#define SIMPLECLI_VERSION_REVISION 3

src/c/cmd.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ cmd* cmd_add_arg(cmd* c, arg* a) {
163163
}
164164

165165
// Reset CMD
166-
void cmd_reset(cmd* c) {
166+
void cmd_reset_cli(cmd* c) {
167167
if (c) {
168168
if (c->mode == CMD_BOUNDLESS) {
169169
arg_destroy_rec(c->arg_list);
@@ -174,10 +174,10 @@ void cmd_reset(cmd* c) {
174174
}
175175
}
176176

177-
void cmd_reset_rec(cmd* c) {
177+
void cmd_reset_cli_rec(cmd* c) {
178178
if (c) {
179-
cmd_reset(c);
180-
cmd_reset_rec(c->next);
179+
cmd_reset_cli(c);
180+
cmd_reset_cli_rec(c->next);
181181
}
182182
}
183183

src/c/cmd.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ cmd* cmd_push(cmd* l, cmd* c, int max_size);
3434
cmd* cmd_add_arg(cmd* c, arg* a);
3535

3636
// Reset CMD
37-
void cmd_reset(cmd* c);
38-
void cmd_reset_rec(cmd* c);
37+
void cmd_reset_cli(cmd* c);
38+
void cmd_reset_cli_rec(cmd* c);
3939

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

0 commit comments

Comments
 (0)