diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/toxic/chat.c | 2 | ||||
-rw-r--r-- | testing/toxic/main.c | 5 | ||||
-rw-r--r-- | testing/toxic/prompt.c | 2 | ||||
-rw-r--r-- | testing/toxic/windows.c | 5 |
4 files changed, 7 insertions, 7 deletions
diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c index e4da9484..d5edf956 100644 --- a/testing/toxic/chat.c +++ b/testing/toxic/chat.c | |||
@@ -314,7 +314,7 @@ void execute(ToxWindow *self, ChatContext *ctx, Messenger *m, char *cmd) | |||
314 | snprintf(xx, sizeof(xx), "%02X", address[i] & 0xff); | 314 | snprintf(xx, sizeof(xx), "%02X", address[i] & 0xff); |
315 | strcat(id, xx); | 315 | strcat(id, xx); |
316 | } | 316 | } |
317 | wprintw(ctx->history, "Your ID: %s\n", id); | 317 | wprintw(ctx->history, "%s\n", id); |
318 | } | 318 | } |
319 | 319 | ||
320 | else if (strcmp(ctx->line, "/close") == 0) { | 320 | else if (strcmp(ctx->line, "/close") == 0) { |
diff --git a/testing/toxic/main.c b/testing/toxic/main.c index 53639eb2..d1a4be5d 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c | |||
@@ -45,7 +45,7 @@ static void init_term() | |||
45 | refresh(); | 45 | refresh(); |
46 | } | 46 | } |
47 | 47 | ||
48 | static Messenger * init_tox() | 48 | static Messenger *init_tox() |
49 | { | 49 | { |
50 | /* Init core */ | 50 | /* Init core */ |
51 | Messenger *m = initMessenger(); | 51 | Messenger *m = initMessenger(); |
@@ -199,7 +199,6 @@ int main(int argc, char *argv[]) | |||
199 | char *DATA_FILE = NULL; | 199 | char *DATA_FILE = NULL; |
200 | int config_err = 0; | 200 | int config_err = 0; |
201 | 201 | ||
202 | /* This is broken */ | ||
203 | int f_loadfromfile = 1; | 202 | int f_loadfromfile = 1; |
204 | int f_flag = 0; | 203 | int f_flag = 0; |
205 | int i = 0; | 204 | int i = 0; |
@@ -233,7 +232,7 @@ int main(int argc, char *argv[]) | |||
233 | 232 | ||
234 | init_term(); | 233 | init_term(); |
235 | Messenger *m = init_tox(); | 234 | Messenger *m = init_tox(); |
236 | ToxWindow * prompt = init_windows(m); | 235 | ToxWindow *prompt = init_windows(m); |
237 | init_window_status(); | 236 | init_window_status(); |
238 | 237 | ||
239 | if(f_loadfromfile) | 238 | if(f_loadfromfile) |
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index fb8a5090..b84773af 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c | |||
@@ -238,7 +238,7 @@ void cmd_myid(ToxWindow *self, Messenger *m, char **args) | |||
238 | snprintf(xx, sizeof(xx), "%02X", address[i] & 0xff); | 238 | snprintf(xx, sizeof(xx), "%02X", address[i] & 0xff); |
239 | strcat(id, xx); | 239 | strcat(id, xx); |
240 | } | 240 | } |
241 | wprintw(self->window, "Your ID: %s\n", id); | 241 | wprintw(self->window, "%s\n", id); |
242 | } | 242 | } |
243 | 243 | ||
244 | void cmd_nick(ToxWindow *self, Messenger *m, char **args) | 244 | void cmd_nick(ToxWindow *self, Messenger *m, char **args) |
diff --git a/testing/toxic/windows.c b/testing/toxic/windows.c index d19392ac..aab46e99 100644 --- a/testing/toxic/windows.c +++ b/testing/toxic/windows.c | |||
@@ -159,7 +159,7 @@ void init_window_status() | |||
159 | WINDOW_STATUS[j] = -1; | 159 | WINDOW_STATUS[j] = -1; |
160 | } | 160 | } |
161 | 161 | ||
162 | ToxWindow * init_windows() | 162 | ToxWindow *init_windows() |
163 | { | 163 | { |
164 | w_num = 0; | 164 | w_num = 0; |
165 | int n_prompt = 0; | 165 | int n_prompt = 0; |
@@ -170,6 +170,7 @@ ToxWindow * init_windows() | |||
170 | endwin(); | 170 | endwin(); |
171 | exit(1); | 171 | exit(1); |
172 | } | 172 | } |
173 | active_window = n_prompt; | ||
173 | prompt = &windows[n_prompt]; | 174 | prompt = &windows[n_prompt]; |
174 | return prompt; | 175 | return prompt; |
175 | } | 176 | } |
@@ -217,7 +218,7 @@ void prepare_window(WINDOW *w) | |||
217 | wresize(w, LINES-2, COLS); | 218 | wresize(w, LINES-2, COLS); |
218 | } | 219 | } |
219 | 220 | ||
220 | void draw_active_window(Messenger * m) | 221 | void draw_active_window(Messenger *m) |
221 | { | 222 | { |
222 | 223 | ||
223 | ToxWindow *a = &windows[active_window]; | 224 | ToxWindow *a = &windows[active_window]; |