mirror of
https://github.com/sheumann/hush.git
synced 2024-12-21 23:29:34 +00:00
dont use obsolete function index() as pointed out by src.obsolete.funcs
This commit is contained in:
parent
75acbe322c
commit
7a96504d30
@ -224,7 +224,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
|
||||
newl = 1;
|
||||
word = tempstr;
|
||||
while (word && *word) {
|
||||
sp = index(word, ' ');
|
||||
sp = strchr(word, ' ');
|
||||
if (sp)
|
||||
*sp++ = 0;
|
||||
|
||||
@ -236,7 +236,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
|
||||
if (wlen > room ||
|
||||
(newl && wlen < 4 && sp
|
||||
&& wlen + 1 + strlen(sp) > room
|
||||
&& (!(sp2 = index(sp, ' '))
|
||||
&& (!(sp2 = strchr(sp, ' '))
|
||||
|| wlen + 1 + (sp2 - sp) > room))) {
|
||||
cur_y++;
|
||||
cur_x = x;
|
||||
|
Loading…
Reference in New Issue
Block a user