diff options
Diffstat (limited to 'testing/toxic/prompt.c')
-rw-r--r-- | testing/toxic/prompt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index c01ed710..bc4b8545 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c | |||
@@ -11,11 +11,12 @@ | |||
11 | #include "../../core/network.h" | 11 | #include "../../core/network.h" |
12 | 12 | ||
13 | #include "windows.h" | 13 | #include "windows.h" |
14 | #include "prompt.h" | ||
14 | 15 | ||
15 | uint8_t pending_requests[MAX_STR_SIZE][CLIENT_ID_SIZE]; // XXX | 16 | uint8_t pending_requests[MAX_STR_SIZE][CLIENT_ID_SIZE]; // XXX |
16 | uint8_t num_requests=0; // XXX | 17 | uint8_t num_requests=0; // XXX |
17 | 18 | ||
18 | extern void on_friendadded(Messenger *m, int friendnumber); | 19 | static friendAddedFn *on_friendadded; |
19 | static char prompt_buf[MAX_STR_SIZE] = {0}; | 20 | static char prompt_buf[MAX_STR_SIZE] = {0}; |
20 | static int prompt_buf_pos = 0; | 21 | static int prompt_buf_pos = 0; |
21 | 22 | ||
@@ -428,8 +429,9 @@ static void prompt_onInit(ToxWindow *self, Messenger *m) | |||
428 | wclrtoeol(self->window); | 429 | wclrtoeol(self->window); |
429 | } | 430 | } |
430 | 431 | ||
431 | ToxWindow new_prompt() | 432 | ToxWindow new_prompt(friendAddedFn *f) |
432 | { | 433 | { |
434 | on_friendadded = f; | ||
433 | ToxWindow ret; | 435 | ToxWindow ret; |
434 | memset(&ret, 0, sizeof(ret)); | 436 | memset(&ret, 0, sizeof(ret)); |
435 | ret.onKey = &prompt_onKey; | 437 | ret.onKey = &prompt_onKey; |