summaryrefslogtreecommitdiff
path: root/testing/toxic/prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/toxic/prompt.c')
-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 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
15uint8_t pending_requests[MAX_STR_SIZE][CLIENT_ID_SIZE]; // XXX 16uint8_t pending_requests[MAX_STR_SIZE][CLIENT_ID_SIZE]; // XXX
16uint8_t num_requests=0; // XXX 17uint8_t num_requests=0; // XXX
17 18
18extern void on_friendadded(Messenger *m, int friendnumber); 19static friendAddedFn *on_friendadded;
19static char prompt_buf[MAX_STR_SIZE] = {0}; 20static char prompt_buf[MAX_STR_SIZE] = {0};
20static int prompt_buf_pos = 0; 21static 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
431ToxWindow new_prompt() 432ToxWindow 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;