From ea969c6e420f93f47fc7bf9b52abbffdee696a49 Mon Sep 17 00:00:00 2001 From: Sean Qureshi Date: Wed, 7 Aug 2013 00:24:37 -0700 Subject: Manually merged my earlier commits with upstream --- testing/toxic/main.c | 3 ++- testing/toxic/prompt.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'testing/toxic') diff --git a/testing/toxic/main.c b/testing/toxic/main.c index 1ba8b6c9..2bf16769 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c @@ -22,6 +22,7 @@ extern int add_req(uint8_t *public_key); // XXX /* Holds status of chat windows */ char WINDOW_STATUS[MAX_WINDOW_SLOTS]; +#define TOXICVER "0.1.0" //Will be moved to a -D flag later static ToxWindow windows[MAX_WINDOW_SLOTS]; static ToxWindow* prompt; @@ -257,7 +258,7 @@ static void draw_bar() move(LINES - 1, 0); attron(COLOR_PAIR(4) | A_BOLD); - printw(" TOXIC 1.0 |"); + printw(" TOXIC " TOXICVER " |"); attroff(COLOR_PAIR(4) | A_BOLD); int i; diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index 89c87d8f..c4d7d2f1 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c @@ -52,6 +52,13 @@ static void execute(ToxWindow *self, char *u_cmd) cmd[i - newlines] = u_cmd[i]; } + if (cmd[0] == '/') { + int i; + for (i = i1; i < strlen(cmd); i++) { //This doesn't work when it doesn't end with a space and another word + cmd[i - 1] = cmd[i]; //Still working on why + } + } + if (!strcmp(cmd, "quit") || !strcmp(cmd, "exit") || !strcmp(cmd, "q")) { endwin(); exit(0); -- cgit v1.2.3