diff options
author | Aaron Lipinski <kris.lipinski@gmail.com> | 2013-08-13 10:50:43 +1200 |
---|---|---|
committer | Aaron Lipinski <kris.lipinski@gmail.com> | 2013-08-15 00:36:30 +1200 |
commit | 75ce48146a7764b67a19d41e4da5d279d59b6ea1 (patch) | |
tree | b59b94538e495e0dfc6189c64f295a0e860fe79e /testing/toxic/chat.c | |
parent | 3f37c5580dc6cfd0920095f6d3c99aba035724ee (diff) |
remove externs in favor of includes
Diffstat (limited to 'testing/toxic/chat.c')
-rw-r--r-- | testing/toxic/chat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c index 1b5e743d..6811569b 100644 --- a/testing/toxic/chat.c +++ b/testing/toxic/chat.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include "../../core/network.h" | 13 | #include "../../core/network.h" |
14 | 14 | ||
15 | #include "windows.h" | 15 | #include "windows.h" |
16 | #include "friendlist.h" | ||
17 | #include "chat.h" | ||
16 | 18 | ||
17 | #define CURS_Y_OFFSET 3 | 19 | #define CURS_Y_OFFSET 3 |
18 | 20 | ||
@@ -24,10 +26,8 @@ typedef struct { | |||
24 | WINDOW* linewin; | 26 | WINDOW* linewin; |
25 | } ChatContext; | 27 | } ChatContext; |
26 | 28 | ||
27 | extern int active_window; | 29 | static delWindowFn *del_window; |
28 | 30 | ||
29 | extern void del_window(ToxWindow *w, int f_num); | ||
30 | extern void fix_name(uint8_t *name); | ||
31 | void print_help(ChatContext *self); | 31 | void print_help(ChatContext *self); |
32 | void execute(ToxWindow *self, ChatContext *ctx, Messenger *m, char *cmd); | 32 | void execute(ToxWindow *self, ChatContext *ctx, Messenger *m, char *cmd); |
33 | 33 | ||
@@ -320,7 +320,6 @@ void execute(ToxWindow *self, ChatContext *ctx, Messenger *m, char *cmd) | |||
320 | } | 320 | } |
321 | 321 | ||
322 | else if (strcmp(ctx->line, "/close") == 0) { | 322 | else if (strcmp(ctx->line, "/close") == 0) { |
323 | active_window = 0; // Go to prompt screen | ||
324 | int f_num = ctx->friendnum; | 323 | int f_num = ctx->friendnum; |
325 | delwin(ctx->linewin); | 324 | delwin(ctx->linewin); |
326 | del_window(self, f_num); | 325 | del_window(self, f_num); |
@@ -371,8 +370,9 @@ void print_help(ChatContext *self) | |||
371 | wattroff(self->history, COLOR_PAIR(2)); | 370 | wattroff(self->history, COLOR_PAIR(2)); |
372 | } | 371 | } |
373 | 372 | ||
374 | ToxWindow new_chat(Messenger *m, int friendnum) | 373 | ToxWindow new_chat(Messenger *m, int friendnum, delWindowFn *f) |
375 | { | 374 | { |
375 | del_window = f; | ||
376 | ToxWindow ret; | 376 | ToxWindow ret; |
377 | memset(&ret, 0, sizeof(ret)); | 377 | memset(&ret, 0, sizeof(ret)); |
378 | 378 | ||