Commit f88d2055 authored by Mike Frysinger's avatar Mike Frysinger Committed by Sam Ravnborg

menuconfig: dont use obsolete index() function in lxdialog

The index() function is obsolete, use strchr() instead.
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 2462566f
...@@ -336,7 +336,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) ...@@ -336,7 +336,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
newl = 1; newl = 1;
word = tempstr; word = tempstr;
while (word && *word) { while (word && *word) {
sp = index(word, ' '); sp = strchr(word, ' ');
if (sp) if (sp)
*sp++ = 0; *sp++ = 0;
...@@ -348,7 +348,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) ...@@ -348,7 +348,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
if (wlen > room || if (wlen > room ||
(newl && wlen < 4 && sp (newl && wlen < 4 && sp
&& wlen + 1 + strlen(sp) > room && wlen + 1 + strlen(sp) > room
&& (!(sp2 = index(sp, ' ')) && (!(sp2 = strchr(sp, ' '))
|| wlen + 1 + (sp2 - sp) > room))) { || wlen + 1 + (sp2 - sp) > room))) {
cur_y++; cur_y++;
cur_x = x; cur_x = x;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment