]> git.tuebingen.mpg.de Git - adu.git/blobdiff - interactive.c
parse_select_options(): Add missing break statements.
[adu.git] / interactive.c
index 036f7a84d1a861eb0a48b21583854cb6fe0a068a..191e6330f3989995ab93c42252f8a7f1d78ad2dd 100644 (file)
@@ -62,6 +62,11 @@ static int icom_help(__a_unused char *line)
        return 1;
 }
 
+void print_interactive_help(void)
+{
+       icom_help(NULL);
+}
+
 static int icom_reset(__a_unused char *line)
 {
        select_cmdline_parser_init(&select_conf);
@@ -94,8 +99,12 @@ static int exec_interactive_command(char *line)
        char *p = cmd + strcspn(cmd, delim);
        int ret = -E_SYNTAX;
 
-       *p = '\0';
-       p++;
+       if (*p == '\0')
+               p = NULL;
+       else {
+               *p = '\0';
+               p++;
+       }
        for (i = 0; icmds[i].name; i++) {
                ERROR_LOG("name: %s, cmd: %s.\n", icmds[i].name, cmd);
                if (strcmp(icmds[i].name, cmd))