mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-02 09:27:14 +03:00
remove more unneeded casts, and add an indentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2010 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
1601c28976
commit
d9fb3e6bde
14
src/nano.c
14
src/nano.c
@ -491,8 +491,8 @@ void help_init(void)
|
||||
if (currshortcut == main_list) {
|
||||
for (t = toggles; t != NULL; t = t->next) {
|
||||
assert(t->desc != NULL);
|
||||
ptr += sprintf(ptr, "M-%c\t\t\t%s %s\n", toupper(t->val), t->desc,
|
||||
_("enable/disable"));
|
||||
ptr += sprintf(ptr, "M-%c\t\t\t%s %s\n", toupper(t->val),
|
||||
t->desc, _("enable/disable"));
|
||||
}
|
||||
}
|
||||
#endif /* !NANO_SMALL */
|
||||
@ -1133,12 +1133,12 @@ void do_next_word(void)
|
||||
|
||||
/* Skip letters in this word first. */
|
||||
while (current->data[current_x] != '\0' &&
|
||||
isalnum((int)current->data[current_x]))
|
||||
isalnum(current->data[current_x]))
|
||||
current_x++;
|
||||
|
||||
for (; current != NULL; current = current->next) {
|
||||
while (current->data[current_x] != '\0' &&
|
||||
!isalnum((int)current->data[current_x]))
|
||||
!isalnum(current->data[current_x]))
|
||||
current_x++;
|
||||
|
||||
if (current->data[current_x] != '\0')
|
||||
@ -1163,11 +1163,11 @@ void do_prev_word(void)
|
||||
assert(current != NULL && current->data != NULL);
|
||||
|
||||
/* Skip letters in this word first. */
|
||||
while (current_x >= 0 && isalnum((int)current->data[current_x]))
|
||||
while (current_x >= 0 && isalnum(current->data[current_x]))
|
||||
current_x--;
|
||||
|
||||
for (; current != NULL; current = current->prev) {
|
||||
while (current_x >= 0 && !isalnum((int)current->data[current_x]))
|
||||
while (current_x >= 0 && !isalnum(current->data[current_x]))
|
||||
current_x--;
|
||||
|
||||
if (current_x >= 0)
|
||||
@ -1181,7 +1181,7 @@ void do_prev_word(void)
|
||||
current = fileage;
|
||||
current_x = 0;
|
||||
} else {
|
||||
while (current_x > 0 && isalnum((int)current->data[current_x - 1]))
|
||||
while (current_x > 0 && isalnum(current->data[current_x - 1]))
|
||||
current_x--;
|
||||
}
|
||||
|
||||
|
@ -259,8 +259,8 @@ bool is_whole_word(int curr_pos, const char *datastr, const char
|
||||
|
||||
/* Start of line or previous character is not a letter and end of
|
||||
* line or next character is not a letter. */
|
||||
return (curr_pos < 1 || !isalpha((int)datastr[curr_pos - 1])) &&
|
||||
(sln == strlen(datastr) || !isalpha((int)datastr[sln]));
|
||||
return (curr_pos < 1 || !isalpha(datastr[curr_pos - 1])) &&
|
||||
(sln == strlen(datastr) || !isalpha(datastr[sln]));
|
||||
}
|
||||
|
||||
/* Look for needle, starting at current, column current_x. If
|
||||
|
Loading…
Reference in New Issue
Block a user