0
|
1 #include <stdio.h> |
|
2 #include <stdlib.h> |
|
3 #include <string.h> |
|
4 #include <ncurses.h> |
|
5 #include <panel.h> |
|
6 #include <time.h> |
|
7 #include <ctype.h> |
|
8 |
|
9 #include "screen.h" |
|
10 #include "utils.h" |
|
11 #include "buddies.h" |
|
12 #include "parsecfg.h" |
|
13 #include "lang.h" |
|
14 #include "server.h" |
|
15 |
|
16 #include "list.h" |
|
17 |
|
18 /* Definicion de tipos */ |
|
19 #define window_entry(n) list_entry(n, window_entry_t, list) |
|
20 |
|
21 typedef struct _window_entry_t { |
|
22 WINDOW *win; |
|
23 PANEL *panel; |
|
24 char *name; |
|
25 int nlines; |
|
26 char **texto; |
|
27 struct list_head list; |
|
28 } window_entry_t; |
|
29 |
|
30 LIST_HEAD(window_list); |
|
31 |
|
32 /* Variables globales a SCREEN.C */ |
1
|
33 WINDOW *rosterWnd, *chatWnd, *inputWnd; |
|
34 WINDOW *logWnd, *logWnd_border; |
|
35 PANEL *rosterPanel, *chatPanel, *inputPanel; |
|
36 PANEL *logPanel, *logPanel_border; |
0
|
37 int maxY, maxX; |
|
38 window_entry_t *ventanaActual; |
|
39 |
1
|
40 char inputLine[INPUTLINE_LENGTH]; |
|
41 char *ptr_inputline; |
|
42 |
0
|
43 |
|
44 /* Funciones */ |
|
45 |
|
46 int scr_WindowHeight(WINDOW * win) |
|
47 { |
|
48 int x, y; |
|
49 getmaxyx(win, y, x); |
|
50 return x; |
|
51 } |
|
52 |
1
|
53 void scr_draw_box(WINDOW * win, int y, int x, int height, int width, |
|
54 int Color, chtype box, chtype border) |
0
|
55 { |
|
56 int i, j; |
|
57 |
|
58 wattrset(win, COLOR_PAIR(Color)); |
|
59 for (i = 0; i < height; i++) { |
|
60 wmove(win, y + i, x); |
|
61 for (j = 0; j < width; j++) |
|
62 if (!i && !j) |
|
63 waddch(win, border | ACS_ULCORNER); |
|
64 else if (i == height - 1 && !j) |
|
65 waddch(win, border | ACS_LLCORNER); |
|
66 else if (!i && j == width - 1) |
|
67 waddch(win, box | ACS_URCORNER); |
|
68 else if (i == height - 1 && j == width - 1) |
|
69 waddch(win, box | ACS_LRCORNER); |
|
70 else if (!i) |
|
71 waddch(win, border | ACS_HLINE); |
|
72 else if (i == height - 1) |
|
73 waddch(win, box | ACS_HLINE); |
|
74 else if (!j) |
|
75 waddch(win, border | ACS_VLINE); |
|
76 else if (j == width - 1) |
|
77 waddch(win, box | ACS_VLINE); |
|
78 else |
|
79 waddch(win, box | ' '); |
|
80 } |
|
81 } |
|
82 |
|
83 int FindColor(char *name) |
|
84 { |
|
85 if (!strcmp(name, "default")) |
|
86 return -1; |
|
87 if (!strcmp(name, "black")) |
|
88 return COLOR_BLACK; |
|
89 if (!strcmp(name, "red")) |
|
90 return COLOR_RED; |
|
91 if (!strcmp(name, "green")) |
|
92 return COLOR_GREEN; |
|
93 if (!strcmp(name, "yellow")) |
|
94 return COLOR_YELLOW; |
|
95 if (!strcmp(name, "blue")) |
|
96 return COLOR_BLUE; |
|
97 if (!strcmp(name, "magenta")) |
|
98 return COLOR_MAGENTA; |
|
99 if (!strcmp(name, "cyan")) |
|
100 return COLOR_CYAN; |
|
101 if (!strcmp(name, "white")) |
|
102 return COLOR_WHITE; |
|
103 |
|
104 return -1; |
|
105 } |
|
106 |
|
107 void ParseColors(void) |
|
108 { |
|
109 char *colors[11] = { |
|
110 "", "", |
|
111 "borderlines", |
|
112 "jidonlineselected", |
|
113 "jidonline", |
|
114 "jidofflineselected", |
|
115 "jidoffline", |
|
116 "text", |
|
117 NULL |
|
118 }; |
|
119 |
|
120 char *tmp = malloc(1024); |
|
121 char *color1; |
|
122 char *background = cfg_read("color_background"); |
|
123 char *backselected = cfg_read("color_backselected"); |
|
124 int i = 0; |
|
125 |
|
126 while (colors[i]) { |
|
127 sprintf(tmp, "color_%s", colors[i]); |
|
128 color1 = cfg_read(tmp); |
|
129 |
|
130 switch (i + 1) { |
|
131 case 1: |
|
132 init_pair(1, COLOR_BLACK, COLOR_WHITE); |
|
133 break; |
|
134 case 2: |
|
135 init_pair(2, COLOR_WHITE, COLOR_BLACK); |
|
136 break; |
|
137 case 3: |
|
138 init_pair(3, FindColor(color1), FindColor(background)); |
|
139 break; |
|
140 case 4: |
|
141 init_pair(4, FindColor(color1), FindColor(backselected)); |
|
142 break; |
|
143 case 5: |
|
144 init_pair(5, FindColor(color1), FindColor(background)); |
|
145 break; |
|
146 case 6: |
|
147 init_pair(6, FindColor(color1), FindColor(backselected)); |
|
148 break; |
|
149 case 7: |
|
150 init_pair(7, FindColor(color1), FindColor(background)); |
|
151 break; |
|
152 case 8: |
|
153 init_pair(8, FindColor(color1), FindColor(background)); |
|
154 break; |
|
155 } |
|
156 i++; |
|
157 } |
|
158 } |
|
159 |
|
160 |
|
161 window_entry_t *scr_CreatePanel(char *title, int x, int y, int lines, |
|
162 int cols) |
|
163 { |
|
164 window_entry_t *tmp = calloc(1, sizeof(window_entry_t)); |
|
165 |
|
166 tmp->win = newwin(lines, cols, y, x); |
|
167 tmp->panel = new_panel(tmp->win); |
|
168 tmp->name = (char *) calloc(1, 1024); |
|
169 strncpy(tmp->name, title, 1024); |
|
170 scr_draw_box(tmp->win, 0, 0, lines, cols, COLOR_GENERAL, 0, 0); |
|
171 mvwprintw(tmp->win, 0, (cols - (2 + strlen(title))) / 2, " %s ", title); |
|
172 |
|
173 list_add_tail(&tmp->list, &window_list); |
|
174 update_panels(); |
|
175 |
|
176 return tmp; |
|
177 } |
|
178 |
|
179 |
1
|
180 void scr_CreatePopup(char *title, char *texto, int corte, int type, |
|
181 char *returnstring) |
0
|
182 { |
|
183 WINDOW *popupWin; |
|
184 PANEL *popupPanel; |
|
185 |
|
186 int lineas = 0; |
|
187 int cols = 0; |
|
188 |
|
189 char **submsgs; |
|
190 int n = 0; |
|
191 int i; |
|
192 |
|
193 char *instr = (char *) calloc(1, 1024); |
|
194 |
|
195 /* fprintf(stderr, "\r\n%d", lineas); */ |
|
196 |
|
197 submsgs = ut_SplitMessage(texto, &n, corte); |
|
198 |
|
199 switch (type) { |
|
200 case 1: |
|
201 case 0: |
|
202 lineas = n + 4; |
|
203 break; |
|
204 } |
|
205 |
|
206 cols = corte + 3; |
|
207 popupWin = newwin(lineas, cols, (maxY - lineas) / 2, (maxX - cols) / 2); |
|
208 popupPanel = new_panel(popupWin); |
|
209 |
|
210 /*ATENCION!!! Colorear el popup ?? |
|
211 / box (popupWin, 0, 0); */ |
|
212 scr_draw_box(popupWin, 0, 0, lineas, cols, COLOR_POPUP, 0, 0); |
|
213 mvwprintw(popupWin, 0, (cols - (2 + strlen(title))) / 2, " %s ", title); |
|
214 |
|
215 for (i = 0; i < n; i++) |
|
216 mvwprintw(popupWin, i + 1, 2, "%s", submsgs[i]); |
|
217 |
|
218 |
|
219 for (i = 0; i < n; i++) |
|
220 free(submsgs[i]); |
|
221 free(submsgs); |
|
222 |
|
223 switch (type) { |
|
224 case 0: |
|
225 mvwprintw(popupWin, n + 2, |
|
226 (cols - (2 + strlen(i18n("Press any key")))) / 2, |
|
227 i18n("Press any key")); |
|
228 update_panels(); |
|
229 doupdate(); |
|
230 getch(); |
|
231 break; |
|
232 case 1: |
|
233 { |
|
234 char ch; |
|
235 int scroll = 0; |
|
236 int input_x = 0; |
|
237 |
|
238 wmove(popupWin, 3, 1); |
|
239 wrefresh(popupWin); |
|
240 keypad(popupWin, TRUE); |
|
241 while ((ch = getch()) != '\n') { |
|
242 switch (ch) { |
|
243 case 0x09: |
|
244 case KEY_UP: |
|
245 case KEY_DOWN: |
|
246 break; |
|
247 case KEY_RIGHT: |
|
248 case KEY_LEFT: |
|
249 break; |
|
250 case KEY_BACKSPACE: |
|
251 case 127: |
|
252 if (input_x || scroll) { |
|
253 /* wattrset (popupWin, 0); */ |
|
254 if (!input_x) { |
|
255 scroll = scroll < cols - 3 ? 0 : scroll - (cols - 3); |
|
256 wmove(popupWin, 3, 1); |
|
257 for (i = 0; i < cols; i++) |
|
258 waddch |
|
259 (popupWin, |
|
260 instr |
|
261 [scroll |
|
262 + input_x + i] ? instr[scroll + input_x + i] : ' '); |
|
263 input_x = strlen(instr) - scroll; |
|
264 } else |
|
265 input_x--; |
|
266 instr[scroll + input_x] = '\0'; |
|
267 mvwaddch(popupWin, 3, input_x + 1, ' '); |
|
268 wmove(popupWin, 3, input_x + 1); |
|
269 wrefresh(popupWin); |
|
270 } |
|
271 default: |
|
272 if ( /*ch<0x100 && */ isprint(ch) || ch == '�' |
|
273 || ch == '�') { |
|
274 if (scroll + input_x < 1024) { |
|
275 instr[scroll + input_x] = ch; |
|
276 instr[scroll + input_x + 1] = '\0'; |
|
277 if (input_x == cols - 3) { |
|
278 scroll++; |
|
279 wmove(popupWin, 3, 1); |
|
280 for (i = 0; i < cols - 3; i++) |
|
281 waddch(popupWin, instr[scroll + i]); |
|
282 } else { |
|
283 wmove(popupWin, 3, 1 + input_x++); |
|
284 waddch(popupWin, ch); |
|
285 } |
|
286 wrefresh(popupWin); |
|
287 } else { |
|
288 flash(); |
|
289 } |
|
290 } |
|
291 } |
|
292 } |
|
293 } |
|
294 if (returnstring != NULL) |
|
295 strcpy(returnstring, instr); |
|
296 break; |
|
297 } |
|
298 |
|
299 del_panel(popupPanel); |
|
300 delwin(popupWin); |
|
301 update_panels(); |
|
302 doupdate(); |
|
303 free(instr); |
|
304 keypad(rosterWnd, TRUE); |
|
305 } |
|
306 |
|
307 |
|
308 |
|
309 void scr_RoolWindow(void) |
|
310 { |
|
311 } |
|
312 |
|
313 window_entry_t *scr_SearchWindow(char *nombreVentana) |
|
314 { |
|
315 struct list_head *pos, *n; |
|
316 window_entry_t *search_entry = NULL; |
|
317 |
|
318 list_for_each_safe(pos, n, &window_list) { |
|
319 search_entry = window_entry(pos); |
|
320 if (search_entry->name) { |
|
321 if (!strcasecmp(search_entry->name, nombreVentana)) { |
|
322 return search_entry; |
|
323 } |
|
324 } |
|
325 } |
|
326 return NULL; |
|
327 } |
|
328 |
|
329 void scr_ShowWindow(char *nombreVentana) |
|
330 { |
|
331 int n, width, i; |
|
332 window_entry_t *tmp = scr_SearchWindow(nombreVentana); |
|
333 if (tmp != NULL) { |
|
334 top_panel(tmp->panel); |
|
335 width = scr_WindowHeight(tmp->win); |
|
336 for (n = 0; n < tmp->nlines; n++) { |
|
337 mvwprintw(tmp->win, n + 1, 1, ""); |
|
338 for (i = 0; i < width - 2; i++) |
|
339 waddch(tmp->win, ' '); |
|
340 mvwprintw(tmp->win, n + 1, 1, "%s", tmp->texto[n]); |
|
341 } |
1
|
342 move(CHAT_WIN_HEIGHT - 1, maxX - 1); |
0
|
343 update_panels(); |
|
344 doupdate(); |
|
345 } |
|
346 } |
|
347 |
|
348 void scr_ShowBuddyWindow(void) |
|
349 { |
|
350 buddy_entry_t *tmp = bud_SelectedInfo(); |
|
351 if (tmp->jid != NULL) |
|
352 scr_ShowWindow(tmp->jid); |
|
353 } |
|
354 |
|
355 |
|
356 void scr_WriteInWindow(char *nombreVentana, char *texto, int TimeStamp) |
|
357 { |
|
358 time_t ahora; |
|
359 int n; |
|
360 int i; |
|
361 int width; |
|
362 window_entry_t *tmp; |
|
363 |
|
364 tmp = scr_SearchWindow(nombreVentana); |
|
365 if (tmp == NULL) { |
1
|
366 tmp = scr_CreatePanel(nombreVentana, 20, 0, CHAT_WIN_HEIGHT, maxX - 20); |
|
367 tmp->texto = (char **) calloc((CHAT_WIN_HEIGHT+1) * 3, sizeof(char *)); |
|
368 for (n = 0; n < CHAT_WIN_HEIGHT * 3; n++) |
0
|
369 tmp->texto[n] = (char *) calloc(1, 1024); |
|
370 |
|
371 if (TimeStamp) { |
|
372 ahora = time(NULL); |
|
373 strftime(tmp->texto[tmp->nlines], 1024, "[%H:%M] ", |
|
374 localtime(&ahora)); |
|
375 strcat(tmp->texto[tmp->nlines], texto); |
|
376 } else { |
|
377 sprintf(tmp->texto[tmp->nlines], " %s", texto); |
|
378 } |
|
379 tmp->nlines++; |
|
380 } else { |
1
|
381 if (tmp->nlines < CHAT_WIN_HEIGHT - 2) { |
0
|
382 if (TimeStamp) { |
|
383 ahora = time(NULL); |
|
384 strftime(tmp->texto[tmp->nlines], 1024, |
|
385 "[%H:%M] ", localtime(&ahora)); |
|
386 strcat(tmp->texto[tmp->nlines], texto); |
|
387 } else { |
|
388 sprintf(tmp->texto[tmp->nlines], " %s", texto); |
|
389 } |
|
390 tmp->nlines++; |
|
391 } else { |
|
392 for (n = 0; n < tmp->nlines; n++) { |
|
393 memset(tmp->texto[n], 0, 1024); |
|
394 strncpy(tmp->texto[n], tmp->texto[n + 1], 1024); |
|
395 } |
|
396 if (TimeStamp) { |
|
397 ahora = time(NULL); |
|
398 strftime(tmp->texto[tmp->nlines - 1], 1024, |
|
399 "[%H:%M] ", localtime(&ahora)); |
|
400 strcat(tmp->texto[tmp->nlines - 1], texto); |
|
401 } else { |
|
402 sprintf(tmp->texto[tmp->nlines - 1], " %s", texto); |
|
403 } |
|
404 } |
|
405 } |
|
406 |
|
407 top_panel(tmp->panel); |
|
408 width = scr_WindowHeight(tmp->win); |
|
409 for (n = 0; n < tmp->nlines; n++) { |
|
410 mvwprintw(tmp->win, n + 1, 1, ""); |
|
411 for (i = 0; i < width - 2; i++) |
|
412 waddch(tmp->win, ' '); |
|
413 mvwprintw(tmp->win, n + 1, 1, "%s", tmp->texto[n]); |
|
414 } |
|
415 |
|
416 update_panels(); |
|
417 doupdate(); |
|
418 } |
|
419 |
|
420 void scr_InitCurses(void) |
|
421 { |
|
422 initscr(); |
|
423 noecho(); |
|
424 raw(); |
|
425 start_color(); |
|
426 use_default_colors(); |
|
427 |
|
428 ParseColors(); |
|
429 |
|
430 getmaxyx(stdscr, maxY, maxX); |
1
|
431 inputLine[0] = 0; |
|
432 ptr_inputline = inputLine; |
0
|
433 |
|
434 return; |
|
435 } |
|
436 |
|
437 void scr_DrawMainWindow(void) |
|
438 { |
1
|
439 /* Draw main panels */ |
0
|
440 rosterWnd = newwin(maxY-1, 20, 0, 0); |
|
441 rosterPanel = new_panel(rosterWnd); |
|
442 scr_draw_box(rosterWnd, 0, 0, maxY-1, 20, COLOR_GENERAL, 0, 0); |
|
443 mvwprintw(rosterWnd, 0, (20 - strlen(i18n("Roster"))) / 2, |
|
444 i18n("Roster")); |
|
445 |
1
|
446 chatWnd = newwin(CHAT_WIN_HEIGHT, maxX - 20, 0, 20); |
0
|
447 chatPanel = new_panel(chatWnd); |
1
|
448 scr_draw_box(chatWnd, 0, 0, CHAT_WIN_HEIGHT, maxX - 20, COLOR_GENERAL, 0, 0); |
0
|
449 mvwprintw(chatWnd, 0, |
|
450 ((maxX - 20) - strlen(i18n("Status Window"))) / 2, |
|
451 i18n("Status Window")); |
|
452 |
1
|
453 logWnd_border = newwin(LOG_WIN_HEIGHT, maxX - 20, CHAT_WIN_HEIGHT, 20); |
|
454 logPanel_border = new_panel(logWnd_border); |
|
455 scr_draw_box(logWnd_border, 0, 0, LOG_WIN_HEIGHT, maxX - 20, COLOR_GENERAL, 0, 0); |
|
456 // mvwprintw(logWnd_border, 0, |
|
457 // ((maxX - 20) - strlen(i18n("Log Window"))) / 2, |
|
458 // i18n("Log Window")); |
|
459 //logWnd = newwin(LOG_WIN_HEIGHT - 2, maxX-20 - 2, CHAT_WIN_HEIGHT+1, 20+1); |
|
460 logWnd = derwin(logWnd_border, LOG_WIN_HEIGHT-2, maxX-20-2, 1, 1); |
|
461 logPanel = new_panel(logWnd); |
|
462 wbkgd(logWnd, COLOR_PAIR(COLOR_GENERAL)); |
|
463 //wattrset(logWnd, COLOR_PAIR(COLOR_GENERAL)); |
|
464 wprintw(logWnd, "Here we are\n"); |
|
465 |
|
466 scrollok(logWnd,TRUE); |
|
467 idlok(logWnd,TRUE); // XXX Necessary? |
|
468 |
|
469 inputWnd = newwin(1, maxX, maxY-1, 0); |
|
470 inputPanel = new_panel(inputWnd); |
|
471 //wbkgd(inputWnd, COLOR_PAIR(COLOR_GENERAL)); |
|
472 |
0
|
473 bud_DrawRoster(rosterWnd); |
|
474 update_panels(); |
|
475 doupdate(); |
|
476 return; |
|
477 } |
|
478 |
|
479 void scr_TerminateCurses(void) |
|
480 { |
|
481 clear(); |
|
482 refresh(); |
|
483 endwin(); |
|
484 return; |
|
485 } |
|
486 |
|
487 void scr_WriteIncomingMessage(char *jidfrom, char *text) |
|
488 { |
|
489 char **submsgs; |
|
490 int n, i; |
|
491 char *buffer = (char *) malloc(5 + strlen(text)); |
|
492 |
|
493 sprintf(buffer, "<<< %s", text); |
|
494 |
|
495 submsgs = |
|
496 ut_SplitMessage(buffer, &n, maxX - scr_WindowHeight(rosterWnd) - 20); |
|
497 |
|
498 for (i = 0; i < n; i++) { |
|
499 if (i == 0) |
|
500 scr_WriteInWindow(jidfrom, submsgs[i], TRUE); |
|
501 else |
|
502 scr_WriteInWindow(jidfrom, submsgs[i], FALSE); |
|
503 } |
|
504 |
|
505 for (i = 0; i < n; i++) |
|
506 free(submsgs[i]); |
|
507 |
|
508 free(submsgs); |
|
509 free(buffer); |
|
510 |
|
511 } |
|
512 |
|
513 void scr_WriteMessage(int sock) |
|
514 { |
|
515 char **submsgs; |
|
516 int n, i; |
|
517 char *buffer = (char *) calloc(1, 1024); |
|
518 char *buffer2 = (char *) calloc(1, 1024); |
|
519 buddy_entry_t *tmp = bud_SelectedInfo(); |
|
520 |
|
521 scr_ShowWindow(tmp->jid); |
|
522 |
|
523 ut_CenterMessage(i18n("write your message here"), 60, buffer2); |
|
524 |
|
525 scr_CreatePopup(tmp->jid, buffer2, 60, 1, buffer); |
|
526 |
|
527 if (strlen(buffer)) { |
|
528 sprintf(buffer2, ">>> %s", buffer); |
|
529 |
|
530 submsgs = |
|
531 ut_SplitMessage(buffer2, &n, |
|
532 maxX - scr_WindowHeight(rosterWnd) - 20); |
|
533 for (i = 0; i < n; i++) { |
|
534 if (i == 0) |
|
535 scr_WriteInWindow(tmp->jid, submsgs[i], TRUE); |
|
536 else |
|
537 scr_WriteInWindow(tmp->jid, submsgs[i], FALSE); |
|
538 } |
|
539 |
|
540 for (i = 0; i < n; i++) |
|
541 free(submsgs[i]); |
|
542 free(submsgs); |
|
543 |
1
|
544 move(CHAT_WIN_HEIGHT - 1, maxX - 1); |
0
|
545 refresh(); |
|
546 sprintf(buffer2, "%s@%s/%s", cfg_read("username"), |
|
547 cfg_read("server"), cfg_read("resource")); |
|
548 srv_sendtext(sock, tmp->jid, buffer, buffer2); |
|
549 } |
|
550 free(buffer); |
|
551 free(buffer2); |
|
552 } |
|
553 |
|
554 int scr_Getch(void) |
|
555 { |
|
556 int ch; |
|
557 keypad(rosterWnd, TRUE); |
|
558 ch = wgetch(rosterWnd); |
|
559 return ch; |
|
560 } |
|
561 |
|
562 WINDOW *scr_GetRosterWindow(void) |
|
563 { |
|
564 return rosterWnd; |
|
565 } |
|
566 |
|
567 WINDOW *scr_GetStatusWindow(void) |
|
568 { |
|
569 return chatWnd; |
|
570 } |
1
|
571 |
|
572 int process_key(int key) |
|
573 { |
|
574 if (isprint(key)) { |
|
575 char tmpLine[INPUTLINE_LENGTH]; |
|
576 strcpy(tmpLine, ptr_inputline); |
|
577 *ptr_inputline++ = key; |
|
578 strcpy(ptr_inputline, tmpLine); |
|
579 } else { |
|
580 switch(key) { |
|
581 case KEY_BACKSPACE: |
|
582 if (ptr_inputline != (char*)&inputLine) { |
|
583 *--ptr_inputline = 0; |
|
584 } |
|
585 break; |
|
586 case KEY_LEFT: |
|
587 if (ptr_inputline != (char*)&inputLine) { |
|
588 ptr_inputline--; |
|
589 } |
|
590 break; |
|
591 case KEY_RIGHT: |
|
592 if (*ptr_inputline) |
|
593 ptr_inputline++; |
|
594 break; |
|
595 case 9: // Tab |
|
596 wprintw(logWnd, "\nI'm unable to complete yet"); |
|
597 break; |
|
598 case '\n': // Enter |
|
599 // XXX Test: |
|
600 if (!strcasecmp(inputLine, "/quit")) { |
|
601 return 255; |
|
602 } |
|
603 // TODO processing |
|
604 ptr_inputline = inputLine; |
|
605 *ptr_inputline = 0; |
|
606 break; |
|
607 case KEY_UP: |
|
608 bud_RosterUp(); |
|
609 break; |
|
610 case KEY_DOWN: |
|
611 bud_RosterDown(); |
|
612 break; |
|
613 } |
|
614 } |
|
615 mvwprintw(inputWnd, 0,0, "%s", inputLine); |
|
616 wclrtoeol(inputWnd); |
|
617 if (*ptr_inputline) { |
|
618 wmove(inputWnd, 0, ptr_inputline - (char*)&inputLine); |
|
619 } |
|
620 update_panels(); |
|
621 doupdate(); |
|
622 return 0; |
|
623 } |