diff --git a/src/color.c b/src/color.c index 21c7539ef3053e5b5a2d116322c9b2f7151ab1a2..7ad223e6ef76e34dbb6792d53209b0c8f267e7cf 100644 --- a/src/color.c +++ b/src/color.c @@ -119,7 +119,7 @@ void update_color(void) /* if we haven't found a match, use the override string */ if (colorstrings == NULL && syntaxstr != NULL) { - for (tmpsyntax = syntaxes; tmpsyntax != NULL; + for (tmpsyntax = syntaxes; tmpsyntax != NULL; tmpsyntax = tmpsyntax->next) { if (!strcasecmp(tmpsyntax->desc, syntaxstr)) colorstrings = tmpsyntax->color; diff --git a/src/files.c b/src/files.c index 05ff48855c262c715bc995539c67495c99046b43..b6af395b7d9db79e403851ecde57900a65e17ea1 100644 --- a/src/files.c +++ b/src/files.c @@ -2661,7 +2661,7 @@ char *do_browser(const char *inpath) case NANO_PREVPAGE_FKEY: case '-': /* Pico compatibility */ if (selected >= (editwinrows + lineno % editwinrows) * width) - selected -= (editwinrows + lineno % editwinrows) * width; + selected -= (editwinrows + lineno % editwinrows) * width; else selected = 0; break; diff --git a/src/proto.h b/src/proto.h index 00e12be093db5e4a7bb45ee326f8afeacc5ff673..082e8d3fb62fd34b9335a773b79a086cc1a0bdee 100644 --- a/src/proto.h +++ b/src/proto.h @@ -114,10 +114,10 @@ extern const shortcut *currshortcut; #ifdef HAVE_REGEX_H extern regex_t search_regexp; -extern regmatch_t regmatches[10]; +extern regmatch_t regmatches[10]; #ifdef ENABLE_COLOR extern regex_t syntaxfile_regexp; -extern regmatch_t synfilematches[1]; +extern regmatch_t synfilematches[1]; #endif /* ENABLE_COLOR */ #endif /* HAVE_REGEX_H */ @@ -412,7 +412,7 @@ char *get_history_newer(historyheadtype *h); char *get_history_completion(historyheadtype *h, char *s); void free_history(historyheadtype *h); #ifdef ENABLE_NANORC -void load_history(void); +void load_history(void); void save_history(void); #endif #endif diff --git a/src/search.c b/src/search.c index 0102cfe3fe0d3e2e58b112130e44fa07246dc5f2..f0d187f40425e8bc20305ae820781697b9047abd 100644 --- a/src/search.c +++ b/src/search.c @@ -318,7 +318,7 @@ int findnextstr(int can_display_wrap, int wholeword, const filestruct /* Original start line reached. */ if (fileptr == begin) - search_last_line = 1; + search_last_line = TRUE; rev_start = fileptr->data; #ifndef NANO_SMALL if (ISSET(REVERSE_SEARCH)) @@ -389,7 +389,7 @@ int do_search(void) update_history(&search_history, answer); #endif - search_last_line = 0; + search_last_line = FALSE; didfind = findnextstr(TRUE, FALSE, current, current_x, answer, FALSE); edit_refresh(); placewewant = xplustabs(); @@ -440,7 +440,7 @@ int do_research(void) return -1; #endif - search_last_line = 0; + search_last_line = FALSE; didfind = findnextstr(TRUE, FALSE, current, current_x, last_search, FALSE); edit_refresh(); placewewant = xplustabs(); @@ -926,7 +926,7 @@ int do_find_bracket(void) /* We constructed regexp_pat to be a valid expression. */ assert(regexp_compiled); - search_last_line = 0; + search_last_line = FALSE; while (TRUE) { if (findnextstr(FALSE, FALSE, current, current_x, regexp_pat, FALSE) != 0) { /* Found identical bracket. */