summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNominate <thomas.bladon@st-hughs.ox.ac.uk>2013-08-05 18:33:16 +0100
committerNominate <thomas.bladon@st-hughs.ox.ac.uk>2013-08-05 18:33:16 +0100
commit39545a92dab828d2342c5e4160f30da320d81748 (patch)
tree5275daa49e496ad25ef17e613d0fec7a0011ecd0
parentdc3fe775fca468ace65165fa1178b8d35397e20a (diff)
Added a 'clear' function to the prompt
-rw-r--r--testing/toxic/prompt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c
index 463b9352..c28980c4 100644
--- a/testing/toxic/prompt.c
+++ b/testing/toxic/prompt.c
@@ -158,7 +158,9 @@ static void execute(ToxWindow* self, char* cmd) {
158 break; 158 break;
159 } 159 }
160 } 160 }
161 161 else if(!strcmp(cmd, "clear")) {
162 wclear(self->window);
163 }
162 else if(!strcmp(cmd, "help")) { 164 else if(!strcmp(cmd, "help")) {
163 print_usage(self); 165 print_usage(self);
164 } 166 }
@@ -316,7 +318,7 @@ static void print_usage(ToxWindow* self) {
316 wprintw(self->window, " myid : Print your ID\n"); 318 wprintw(self->window, " myid : Print your ID\n");
317 wprintw(self->window, " quit/exit : Exit program\n"); 319 wprintw(self->window, " quit/exit : Exit program\n");
318 wprintw(self->window, " help : Print this message again\n"); 320 wprintw(self->window, " help : Print this message again\n");
319 321 wprintw(self->window, " clear: : Clear this window\n");
320 322
321 wattron(self->window, A_BOLD); 323 wattron(self->window, A_BOLD);
322 wprintw(self->window, "TIP: Use the TAB key to navigate through the tabs.\n\n"); 324 wprintw(self->window, "TIP: Use the TAB key to navigate through the tabs.\n\n");