diff options
Diffstat (limited to 'testing/nTox.c')
-rw-r--r-- | testing/nTox.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/testing/nTox.c b/testing/nTox.c index a9af5239..6ac663a6 100644 --- a/testing/nTox.c +++ b/testing/nTox.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | char lines[HISTORY][STRING_LENGTH]; | 53 | char lines[HISTORY][STRING_LENGTH]; |
54 | char line[STRING_LENGTH]; | 54 | char input_line[STRING_LENGTH]; |
55 | 55 | ||
56 | char *help = "[i] commands:\n/f ID (to add friend)\n/m friendnumber message " | 56 | char *help = "[i] commands:\n/f ID (to add friend)\n/m friendnumber message " |
57 | "(to send message)\n/s status (to change status)\n[i] /l list (l" | 57 | "(to send message)\n/s status (to change status)\n[i] /l list (l" |
@@ -442,7 +442,7 @@ void do_refresh() | |||
442 | move(y - 1, 0); | 442 | move(y - 1, 0); |
443 | clrtoeol(); | 443 | clrtoeol(); |
444 | printw(">> "); | 444 | printw(">> "); |
445 | printw(line); | 445 | printw(input_line); |
446 | clrtoeol(); | 446 | clrtoeol(); |
447 | refresh(); | 447 | refresh(); |
448 | } | 448 | } |
@@ -642,7 +642,7 @@ int main(int argc, char *argv[]) | |||
642 | new_lines("/h for list of commands"); | 642 | new_lines("/h for list of commands"); |
643 | get_id(m, idstring); | 643 | get_id(m, idstring); |
644 | new_lines(idstring); | 644 | new_lines(idstring); |
645 | strcpy(line, ""); | 645 | strcpy(input_line, ""); |
646 | 646 | ||
647 | uint16_t port = htons(atoi(argv[argvoffset + 2])); | 647 | uint16_t port = htons(atoi(argv[argvoffset + 2])); |
648 | unsigned char *binary_string = hex_string_to_bin(argv[argvoffset + 3]); | 648 | unsigned char *binary_string = hex_string_to_bin(argv[argvoffset + 3]); |
@@ -694,12 +694,12 @@ int main(int argc, char *argv[]) | |||
694 | getmaxyx(stdscr, y, x); | 694 | getmaxyx(stdscr, y, x); |
695 | 695 | ||
696 | if ((c == 0x0d) || (c == 0x0a)) { | 696 | if ((c == 0x0d) || (c == 0x0a)) { |
697 | line_eval(m, line); | 697 | line_eval(m, input_line); |
698 | strcpy(line, ""); | 698 | strcpy(input_line, ""); |
699 | } else if (c == 8 || c == 127) { | 699 | } else if (c == 8 || c == 127) { |
700 | line[strlen(line) - 1] = '\0'; | 700 | input_line[strlen(input_line) - 1] = '\0'; |
701 | } else if (isalnum(c) || ispunct(c) || c == ' ') { | 701 | } else if (isalnum(c) || ispunct(c) || c == ' ') { |
702 | strcpy(line, appender(line, (char) c)); | 702 | strcpy(input_line, appender(input_line, (char) c)); |
703 | } | 703 | } |
704 | } | 704 | } |
705 | 705 | ||