]> git.wh0rd.org Git - nano.git/commitdiff
remove more unneeded casts, and add an indentation fix
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Thu, 21 Oct 2004 22:49:51 +0000 (22:49 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Thu, 21 Oct 2004 22:49:51 +0000 (22:49 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2010 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/nano.c
src/search.c

index c6c8372c67ee25cb4cd46f563bb228885e69dac2..f8d0f5b207037db8f25133579399d0937382b8d2 100644 (file)
@@ -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--;
     }
 
index c24a0c23f4a32e68cec718257b647b6e4e549294..06bb41bee8554af8eb19453a489fba4c45abc3bd 100644 (file)
@@ -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