mtr: Fix #305 by implementing hsearch(3) (#1697)
[termux-packages] / disabled-packages / mtr / index_to_strchr.patch
1 --- mtr/ui/curses.c 2017-06-02 08:54:58.000000000 +0000
2 +++ ./ui/curses.c 2017-10-21 22:47:23.221332133 +0000
3 @@ -383,7 +383,7 @@
4 const char *format,
5 int n)
6 {
7 - if (index(format, 'N')) {
8 + if (strchr(format, 'N')) {
9 *dst++ = ' ';
10 format_number(n, 5, dst);
11 } else if (strchr(format, 'f')) {
12
13 --- mtr/ui/cmdpipe.c 2017-10-21 22:50:49.843505234 +0000
14 +++ ./ui/cmdpipe.c 2017-10-21 22:51:08.507344155 +0000
15 @@ -736,7 +736,7 @@
16 */
17 while (true) {
18 /* If no newline is found, our reply isn't yet complete */
19 - end_of_reply = index(reply_start, '\n');
20 + end_of_reply = strchr(reply_start, '\n');
21 if (end_of_reply == NULL) {
22 /* No complete replies remaining */
23 break;
24 --- mtr/packet/command.c 2017-06-02 08:54:58.000000000 +0000
25 +++ ./packet/command.c 2017-10-21 22:55:13.321277161 +0000
26 @@ -380,7 +380,7 @@
27 buffer->incoming_buffer[buffer->incoming_read_position] = 0;
28
29 /* Find the next newline, which terminates command requests */
30 - end_of_command = index(buffer->incoming_buffer, '\n');
31 + end_of_command = strchr(buffer->incoming_buffer, '\n');
32 if (end_of_command == NULL) {
33 /*
34 No newlines found, so any data we've read so far is
35