summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/toxic/main.c3
-rw-r--r--testing/toxic/prompt.c7
2 files changed, 9 insertions, 1 deletions
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
22 22
23/* Holds status of chat windows */ 23/* Holds status of chat windows */
24char WINDOW_STATUS[MAX_WINDOW_SLOTS]; 24char WINDOW_STATUS[MAX_WINDOW_SLOTS];
25#define TOXICVER "0.1.0" //Will be moved to a -D flag later
25 26
26static ToxWindow windows[MAX_WINDOW_SLOTS]; 27static ToxWindow windows[MAX_WINDOW_SLOTS];
27static ToxWindow* prompt; 28static ToxWindow* prompt;
@@ -257,7 +258,7 @@ static void draw_bar()
257 move(LINES - 1, 0); 258 move(LINES - 1, 0);
258 259
259 attron(COLOR_PAIR(4) | A_BOLD); 260 attron(COLOR_PAIR(4) | A_BOLD);
260 printw(" TOXIC 1.0 |"); 261 printw(" TOXIC " TOXICVER " |");
261 attroff(COLOR_PAIR(4) | A_BOLD); 262 attroff(COLOR_PAIR(4) | A_BOLD);
262 263
263 int i; 264 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)
52 cmd[i - newlines] = u_cmd[i]; 52 cmd[i - newlines] = u_cmd[i];
53 } 53 }
54 54
55 if (cmd[0] == '/') {
56 int i;
57 for (i = i1; i < strlen(cmd); i++) { //This doesn't work when it doesn't end with a space and another word
58 cmd[i - 1] = cmd[i]; //Still working on why
59 }
60 }
61
55 if (!strcmp(cmd, "quit") || !strcmp(cmd, "exit") || !strcmp(cmd, "q")) { 62 if (!strcmp(cmd, "quit") || !strcmp(cmd, "exit") || !strcmp(cmd, "q")) {
56 endwin(); 63 endwin();
57 exit(0); 64 exit(0);