mirror of git://git.sv.gnu.org/nano.git
tweaks: use FALSE for booleans instead of zero
Also adjust some indentation and reduce the scope of a variable.
This commit is contained in:
parent
fea1901592
commit
fb17929fab
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue