tweaks: use FALSE for booleans instead of zero

Also adjust some indentation and reduce the scope of a variable.
This commit is contained in:
Benno Schulenberg 2019-06-09 10:41:14 +02:00
parent fea1901592
commit fb17929fab
4 changed files with 9 additions and 11 deletions

View File

@ -70,7 +70,7 @@ bool is_alpha_mbchar(const char *c)
wchar_t wc;
if (mbtowc(&wc, c, MAXCHARLEN) < 0)
return 0;
return FALSE;
return iswalpha(wc);
} else
@ -86,7 +86,7 @@ bool is_alnum_mbchar(const char *c)
wchar_t wc;
if (mbtowc(&wc, c, MAXCHARLEN) < 0)
return 0;
return FALSE;
return iswalnum(wc);
} else
@ -102,7 +102,7 @@ bool is_blank_mbchar(const char *c)
wchar_t wc;
if (mbtowc(&wc, c, MAXCHARLEN) < 0)
return 0;
return FALSE;
return iswblank(wc);
} else
@ -139,7 +139,7 @@ bool is_punct_mbchar(const char *c)
wchar_t wc;
if (mbtowc(&wc, c, MAXCHARLEN) < 0)
return 0;
return FALSE;
return iswpunct(wc);
} else

View File

@ -331,12 +331,10 @@ void check_the_multis(linestruct *line)
/* Allocate (for one line) the cache space for multiline color regexes. */
void alloc_multidata_if_needed(linestruct *fileptr)
{
int i;
if (fileptr->multidata == NULL) {
fileptr->multidata = (short *)nmalloc(openfile->syntax->nmultis * sizeof(short));
for (i = 0; i < openfile->syntax->nmultis; i++)
for (int i = 0; i < openfile->syntax->nmultis; i++)
fileptr->multidata[i] = -1;
}
}

View File

@ -341,9 +341,9 @@ void do_cut_text(bool copying, bool marked, bool until_eof, bool append)
if (using_magicline)
UNSET(NO_NEWLINES);
} else
#endif /* !NANO_TINY */
#endif
set_modified();
refresh_needed = TRUE;
}