Skip to content

Commit 90a6d2d

Browse files
committed
chore: Run "c-code-style" astyle formatter on source/header files
Ran `astyle --options="astyle-code-format.cfg" "./*.c,*.h"`. Fixed some trailing whitepsaces and indentation.
1 parent debd3ad commit 90a6d2d

File tree

4 files changed

+39
-39
lines changed

4 files changed

+39
-39
lines changed

dev/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "lwshell/lwshell.h"
55

66
/**
7-
* \brief Reading one character at a time
7+
* \brief Reading one character at a time
88
*
99
* This is useful to test the shell in a "raw" mode (non-canonical input)
1010
* Please note that conio.h is a windows only header

lwshell/src/include/lwshell/lwshell_opt.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extern "C" {
5454

5555
/**
5656
* \brief Memory set function
57-
*
57+
*
5858
* \note Function footprint is the same as \ref memset
5959
*/
6060
#ifndef LWSHELL_MEMSET
@@ -63,7 +63,7 @@ extern "C" {
6363

6464
/**
6565
* \brief Memory copy function
66-
*
66+
*
6767
* \note Function footprint is the same as \ref memcpy
6868
*/
6969
#ifndef LWSHELL_MEMCPY
@@ -72,7 +72,7 @@ extern "C" {
7272

7373
/**
7474
* \brief Enables `1` or disables `0` dynamic command register with \ref lwshell_register_cmd or \ref lwshell_register_cmd_ex functions
75-
*
75+
*
7676
* \note Set to `1` by default for backward compatibility
7777
* \sa LWSHELL_CFG_USE_STATIC_COMMANDS
7878
*/
@@ -82,12 +82,12 @@ extern "C" {
8282

8383
/**
8484
* \brief Enables `1` or disables `0` static command registration.
85-
*
85+
*
8686
* When enabled, a single register call is used where application
8787
* can pass constant array of the commands and respective callback functions.
88-
*
88+
*
8989
* This allows RAM reduction as lookup tables can be stored in the non-volatile memory
90-
*
90+
*
9191
* \note Set to `0` by default for backward compatibility
9292
* \sa LWSHELL_CFG_USE_DYNAMIC_COMMANDS
9393
*/
@@ -97,7 +97,7 @@ extern "C" {
9797

9898
/**
9999
* \brief Maximum number of different dynamic registered commands
100-
*
100+
*
101101
* \warning Deprecated and replaced with \ref LWSHELL_CFG_MAX_DYNAMIC_CMDS
102102
* \deprecated
103103
*/
@@ -126,7 +126,7 @@ extern "C" {
126126

127127
/**
128128
* \brief Maximum characters for command name in bytes.
129-
*
129+
*
130130
* \note Used only when \ref LWSHELL_CFG_USE_DYNAMIC_COMMANDS is enabled
131131
*/
132132
#ifndef LWSHELL_CFG_MAX_CMD_NAME_LEN

lwshell/src/lwshell/lwshell.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ prv_parse_input(lwshell_t* lwobj) {
9393
size_t s_len;
9494
char* str;
9595

96-
/*
96+
/*
9797
* Check string length and compare with buffer pointer
9898
* Must be more than `1` character since we have to include end of line
9999
*/
@@ -220,8 +220,8 @@ prv_parse_input(lwshell_t* lwobj) {
220220
#endif /* LWSHELL_CFG_USE_LIST_CMD */
221221
} else {
222222
LWSHELL_OUTPUT(lwobj, LWSHELL_CFG_USE_LIST_CMD
223-
? "Unknown command, use listcmd to list available commands\r\n"
224-
: "Unknown command\r\n");
223+
? "Unknown command, use listcmd to list available commands\r\n"
224+
: "Unknown command\r\n");
225225
}
226226
}
227227
}

tests/test.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,51 +11,51 @@ static const test_str_t commands[] = {
1111
{
1212
.command = "test 123 456 789\n",
1313
.args_list =
14-
{
15-
"test",
16-
"123",
17-
"456",
18-
"789",
19-
},
14+
{
15+
"test",
16+
"123",
17+
"456",
18+
"789",
19+
},
2020
},
2121
{
2222
.command = "test 123 longer text\n",
2323
.args_list =
24-
{
25-
"test",
26-
"123",
27-
"longer",
28-
"text",
29-
},
24+
{
25+
"test",
26+
"123",
27+
"longer",
28+
"text",
29+
},
3030
},
3131
{
3232
.command = "test 123 \"longer text\"\n",
3333
.args_list =
34-
{
35-
"test",
36-
"123",
37-
"longer text",
38-
},
34+
{
35+
"test",
36+
"123",
37+
"longer text",
38+
},
3939
},
4040
{
4141
.command = "test 123 \"longer text with \\\" quotes\"\n",
4242
.args_list =
43-
{
44-
"test",
45-
"123",
46-
"longer text with \\\" quotes",
47-
},
43+
{
44+
"test",
45+
"123",
46+
"longer text with \\\" quotes",
47+
},
4848
},
4949
};
5050
static uint32_t current_cmd_index;
5151
static int failed = 0;
5252

5353
/**
5454
* \brief Test command function
55-
*
56-
* \param argc
57-
* \param argv
58-
* \return int32_t
55+
*
56+
* \param argc
57+
* \param argv
58+
* \return int32_t
5959
*/
6060
int32_t
6161
prv_test_cmd(int32_t argc, char** argv) {
@@ -87,7 +87,7 @@ prv_test_cmd(int32_t argc, char** argv) {
8787

8888
/**
8989
* \brief Global test run function
90-
*
90+
*
9191
*/
9292
int
9393
run_test(void) {

0 commit comments

Comments
 (0)