rdline: rename RDLINE_INIT -> RDLINE_STOPPED
authorOlivier Matz <zer0@droids-corp.org>
Thu, 8 Aug 2013 18:10:19 +0000 (20:10 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Thu, 8 Aug 2013 18:10:19 +0000 (20:10 +0200)
modules/ihm/rdline/rdline.c
modules/ihm/rdline/rdline.h

index f71209a..35c82a2 100644 (file)
@@ -52,7 +52,7 @@ void rdline_init(struct rdline *rdl,
        rdl->validate = validate;
        rdl->complete = complete;
        rdl->write_char = write_char;
        rdl->validate = validate;
        rdl->complete = complete;
        rdl->write_char = write_char;
-       rdl->status = RDLINE_INIT;
+       rdl->status = RDLINE_STOPPED;
 #ifdef CONFIG_MODULE_RDLINE_HISTORY
        cirbuf_init(&rdl->history, rdl->history_buf, 0, RDLINE_HISTORY_BUF_SIZE);
 #endif /* CONFIG_MODULE_RDLINE_HISTORY */
 #ifdef CONFIG_MODULE_RDLINE_HISTORY
        cirbuf_init(&rdl->history, rdl->history_buf, 0, RDLINE_HISTORY_BUF_SIZE);
 #endif /* CONFIG_MODULE_RDLINE_HISTORY */
@@ -83,7 +83,7 @@ rdline_newline(struct rdline * rdl, const char * prompt)
 void 
 rdline_stop(struct rdline * rdl)
 {
 void 
 rdline_stop(struct rdline * rdl)
 {
-       rdl->status = RDLINE_INIT;
+       rdl->status = RDLINE_STOPPED;
 }
 
 void
 }
 
 void
@@ -351,7 +351,6 @@ rdline_char_in(struct rdline * rdl, char c)
                case KEY_RETURN:
                case KEY_RETURN2:
                        rdline_get_buffer(rdl);
                case KEY_RETURN:
                case KEY_RETURN2:
                        rdline_get_buffer(rdl);
-                       rdl->status = RDLINE_INIT;
                        rdline_puts_P(rdl, PSTR("\r\n"));
 #ifdef CONFIG_MODULE_RDLINE_HISTORY
                        if (rdl->history_cur_line != -1)
                        rdline_puts_P(rdl, PSTR("\r\n"));
 #ifdef CONFIG_MODULE_RDLINE_HISTORY
                        if (rdl->history_cur_line != -1)
index 9e330b7..40bd20d 100644 (file)
@@ -64,7 +64,7 @@
 #define RDLINE_HISTORY_MAX_LINE 64
 
 enum rdline_status {
 #define RDLINE_HISTORY_MAX_LINE 64
 
 enum rdline_status {
-       RDLINE_INIT,
+       RDLINE_STOPPED,
        RDLINE_RUNNING,
 };
 
        RDLINE_RUNNING,
 };