From 4335f3b49a102bab25f72fc35a9f4e7298baae2b Mon Sep 17 00:00:00 2001 From: hqm <13720409820@163.com> Date: Tue, 28 Sep 2021 23:15:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/linux/linux_main.c | 2 +- extensions/ex_cmds/ex_cmds.c | 2 +- extensions/ex_cmds/ex_cmds.h | 2 +- extensions/ex_keys/ex_keys.c | 12 ++++++------ extensions/ex_keys/ex_keys.h | 2 +- extensions/test/test.c | 8 ++++---- src/xcmd_default_cmds.c | 8 ++++---- src/xcmd_default_keys.c | 14 +++++++------- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/example/linux/linux_main.c b/example/linux/linux_main.c index d6e48ea..523fa16 100755 --- a/example/linux/linux_main.c +++ b/example/linux/linux_main.c @@ -60,7 +60,7 @@ static int key_ctr_c(void* pv) static xcmd_key_t keys[] = { - {CTR_C, key_ctr_c, "ctr+c"}, + {CTR_C, key_ctr_c, "ctr+c", NULL}, }; void user_keys_init(void) diff --git a/extensions/ex_cmds/ex_cmds.c b/extensions/ex_cmds/ex_cmds.c index ef28f02..6f3d0d0 100644 --- a/extensions/ex_cmds/ex_cmds.c +++ b/extensions/ex_cmds/ex_cmds.c @@ -4,4 +4,4 @@ void ex_cmds_init(void) { -} \ No newline at end of file +} diff --git a/extensions/ex_cmds/ex_cmds.h b/extensions/ex_cmds/ex_cmds.h index 3313447..570bc98 100644 --- a/extensions/ex_cmds/ex_cmds.h +++ b/extensions/ex_cmds/ex_cmds.h @@ -11,4 +11,4 @@ void ex_cmds_init(void); } #endif -#endif \ No newline at end of file +#endif diff --git a/extensions/ex_keys/ex_keys.c b/extensions/ex_keys/ex_keys.c index 1efa2f9..1baac0a 100644 --- a/extensions/ex_keys/ex_keys.c +++ b/extensions/ex_keys/ex_keys.c @@ -49,15 +49,15 @@ static int xcmd_ctr_l(void *pv) static xcmd_key_t ex_keys[] = { - {CTR_A, xcmd_ctr_a, "ctr+a"}, - {CTR_E, xcmd_ctr_e, "ctr+e"}, - {CTR_U, xcmd_ctr_u, "ctr+u"}, - {CTR_K, xcmd_ctr_k, "ctr+k"}, - {CTR_L, xcmd_ctr_l, "ctr+l"}, + {CTR_A, xcmd_ctr_a, "ctr+a", NULL}, + {CTR_E, xcmd_ctr_e, "ctr+e", NULL}, + {CTR_U, xcmd_ctr_u, "ctr+u", NULL}, + {CTR_K, xcmd_ctr_k, "ctr+k", NULL}, + {CTR_L, xcmd_ctr_l, "ctr+l", NULL}, }; void ex_keys_init(void) { xcmd_key_register(ex_keys, sizeof(ex_keys)/sizeof(xcmd_key_t)); -} \ No newline at end of file +} diff --git a/extensions/ex_keys/ex_keys.h b/extensions/ex_keys/ex_keys.h index 11dae61..ddf26c3 100644 --- a/extensions/ex_keys/ex_keys.h +++ b/extensions/ex_keys/ex_keys.h @@ -11,4 +11,4 @@ void ex_keys_init(void); } #endif -#endif \ No newline at end of file +#endif diff --git a/extensions/test/test.c b/extensions/test/test.c index 419c9d3..a89ea37 100644 --- a/extensions/test/test.c +++ b/extensions/test/test.c @@ -108,14 +108,14 @@ static int cmd_ctr_q(void* pv) static xcmd_t cmds[] = { - {"echo", cmd_echo, "echo anything"}, - {"history", cmd_history, "show history list"}, - {"example", cmd_example, "example [-f|-i|-s] [val]"}, + {"echo", cmd_echo, "echo anything", NULL}, + {"history", cmd_history, "show history list", NULL}, + {"example", cmd_example, "example [-f|-i|-s] [val]", NULL}, }; static xcmd_key_t keys[] = { - {CTR_Q, cmd_ctr_q, "ctr+q"}, + {CTR_Q, cmd_ctr_q, "ctr+q", NULL}, }; void test_cmd_init(void) diff --git a/src/xcmd_default_cmds.c b/src/xcmd_default_cmds.c index ea1f45c..cd11505 100755 --- a/src/xcmd_default_cmds.c +++ b/src/xcmd_default_cmds.c @@ -51,10 +51,10 @@ static void cmd_logo(int argc, char* argv[]) static xcmd_t cmds[] = { - {"clear", cmd_clear, "clear screen"}, - {"help", cmd_help, "show this list"}, - {"keys", cmd_keys, "show keys"}, - {"logo", cmd_logo, "show logo"}, + {"clear", cmd_clear, "clear screen", NULL}, + {"help", cmd_help, "show this list", NULL}, + {"keys", cmd_keys, "show keys", NULL}, + {"logo", cmd_logo, "show logo", NULL}, }; void default_cmds_init(void) diff --git a/src/xcmd_default_keys.c b/src/xcmd_default_keys.c index 66f5bc0..a586191 100755 --- a/src/xcmd_default_keys.c +++ b/src/xcmd_default_keys.c @@ -108,14 +108,14 @@ static int xcmd_auto_completion(void *pv) static xcmd_key_t default_keys[] = { - {BACKSPACE, xcmd_del_char, "backspace"}, - {L_DELETE, xcmd_del_char, "left delete"}, - {LEFT, xcmd_cursor_left, "left"}, - {RIGHT, xcmd_cursor_right, "right"}, - {TAB, xcmd_auto_completion, "tab"}, + {BACKSPACE, xcmd_del_char, "backspace", NULL}, + {L_DELETE, xcmd_del_char, "left delete", NULL}, + {LEFT, xcmd_cursor_left, "left", NULL}, + {RIGHT, xcmd_cursor_right, "right", NULL}, + {TAB, xcmd_auto_completion, "tab", NULL}, #if XCMD_HISTORY_MAX_NUM - {DW, xcmd_history_dw, "down"}, - {UP, xcmd_history_up, "up"}, + {DW, xcmd_history_dw, "down", NULL}, + {UP, xcmd_history_up, "up", NULL}, #endif };