26 * POSSIBILITY OF SUCH DAMAGE. |
26 * POSSIBILITY OF SUCH DAMAGE. |
27 * |
27 * |
28 */ |
28 */ |
29 |
29 |
30 #include "input.h" |
30 #include "input.h" |
|
31 #include <ctype.h> |
31 |
32 |
32 void init_colorpairs() { |
33 void init_colorpairs() { |
33 init_pair(COL_YB, COLOR_YELLOW, COLOR_BLUE); |
34 init_pair(COL_YB, COLOR_YELLOW, COLOR_BLUE); |
34 init_pair(COL_BW, COLOR_BLACK, COLOR_WHITE); |
35 init_pair(COL_BW, COLOR_BLACK, COLOR_WHITE); |
35 init_pair(COL_WB, COLOR_WHITE, COLOR_BLACK); |
36 init_pair(COL_WB, COLOR_WHITE, COLOR_BLACK); |
68 */ |
69 */ |
69 int mvwasyncgetnstr(WINDOW* w, int y, int x, char *str, size_t len) { |
70 int mvwasyncgetnstr(WINDOW* w, int y, int x, char *str, size_t len) { |
70 static size_t pos = 0; |
71 static size_t pos = 0; |
71 |
72 |
72 if (*str == '\0') { |
73 if (*str == '\0') { |
|
74 memset(str, 0, len); |
73 pos = 0; |
75 pos = 0; |
74 } |
76 } |
75 |
77 |
76 mvwaddstr(w,y, x, str); |
78 mvwaddstr(w,y, x, str); |
77 wrefresh(w); |
79 wrefresh(w); |