mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
toupper(), tolower(), isspace(), is..etc..() aren't safe with chars in some
systems, use our own is_...() functions now instead. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2348 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
820c9d3d82
commit
f4897860b5
35 changed files with 112 additions and 95 deletions
|
|
@ -293,9 +293,9 @@ void gui_entry_erase_word(GUI_ENTRY_REC *entry, int to_space)
|
|||
while (entry->text->str[to] != ' ' && to > 0)
|
||||
to--;
|
||||
} else {
|
||||
while (!isalnum(entry->text->str[to]) && to > 0)
|
||||
while (!i_isalnum(entry->text->str[to]) && to > 0)
|
||||
to--;
|
||||
while (isalnum(entry->text->str[to]) && to > 0)
|
||||
while (i_isalnum(entry->text->str[to]) && to > 0)
|
||||
to--;
|
||||
}
|
||||
if (to > 0) to++;
|
||||
|
|
@ -323,9 +323,9 @@ void gui_entry_erase_next_word(GUI_ENTRY_REC *entry, int to_space)
|
|||
while (entry->text->str[to] != ' ' && to < entry->text->len)
|
||||
to++;
|
||||
} else {
|
||||
while (!isalnum(entry->text->str[to]) && to < entry->text->len)
|
||||
while (!i_isalnum(entry->text->str[to]) && to < entry->text->len)
|
||||
to++;
|
||||
while (isalnum(entry->text->str[to]) && to < entry->text->len)
|
||||
while (i_isalnum(entry->text->str[to]) && to < entry->text->len)
|
||||
to++;
|
||||
}
|
||||
|
||||
|
|
@ -386,9 +386,9 @@ static void gui_entry_move_words_left(GUI_ENTRY_REC *entry, int count, int to_sp
|
|||
while (pos > 0 && entry->text->str[pos-1] != ' ')
|
||||
pos--;
|
||||
} else {
|
||||
while (pos > 0 && !isalnum(entry->text->str[pos-1]))
|
||||
while (pos > 0 && !i_isalnum(entry->text->str[pos-1]))
|
||||
pos--;
|
||||
while (pos > 0 && isalnum(entry->text->str[pos-1]))
|
||||
while (pos > 0 && i_isalnum(entry->text->str[pos-1]))
|
||||
pos--;
|
||||
}
|
||||
count--;
|
||||
|
|
@ -409,9 +409,9 @@ static void gui_entry_move_words_right(GUI_ENTRY_REC *entry, int count, int to_s
|
|||
while (pos < entry->text->len && entry->text->str[pos] != ' ')
|
||||
pos++;
|
||||
} else {
|
||||
while (pos < entry->text->len && !isalnum(entry->text->str[pos]))
|
||||
while (pos < entry->text->len && !i_isalnum(entry->text->str[pos]))
|
||||
pos++;
|
||||
while (pos < entry->text->len && isalnum(entry->text->str[pos]))
|
||||
while (pos < entry->text->len && i_isalnum(entry->text->str[pos]))
|
||||
pos++;
|
||||
}
|
||||
count--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue