From d9fb3e6bdef20e49db0e6e70cf7c0c084c7fbea6 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 21 Oct 2004 22:49:51 +0000 Subject: [PATCH] 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 --- src/nano.c | 14 +++++++------- src/search.c | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/nano.c b/src/nano.c index c6c8372c..f8d0f5b2 100644 --- a/src/nano.c +++ b/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--; } diff --git a/src/search.c b/src/search.c index c24a0c23..06bb41be 100644 --- a/src/search.c +++ b/src/search.c @@ -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 -- 2.39.5