Improving some comments, and removing some mispasted or superfluous ones.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4858 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-05-12 12:11:24 +00:00
parent 1d19e011c3
commit 07f14de995
2 changed files with 7 additions and 10 deletions

View File

@ -1,6 +1,8 @@
2014-05-12 Benno Schulenberg <bensberg@justemail.net> 2014-05-12 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_spell): Provide startup feedback, as for the linter. * src/text.c (do_spell): Provide startup feedback, as for the linter.
* doc/syntax/nanorc.nanorc: Show bright foreground colours as valid. * doc/syntax/nanorc.nanorc: Show bright foreground colours as valid.
* src/rcfile.c: Improve some comments, and remove some others that
are mispasted or superfluous.
2014-05-10 Chris Allegretta <chrisa@asty.org> 2014-05-10 Chris Allegretta <chrisa@asty.org>
* src/rcfile.c (parse_color_names): Redefine false and true to * src/rcfile.c (parse_color_names): Redefine false and true to

View File

@ -347,10 +347,9 @@ void parse_syntax(char *ptr)
return; return;
} }
/* Now load the extensions into their part of the struct. */ /* Now load the extension regexes into their part of the struct. */
while (*ptr != '\0') { while (*ptr != '\0') {
exttype *newext; exttype *newext;
/* The new extension structure. */
while (*ptr != '"' && *ptr != '\0') while (*ptr != '"' && *ptr != '\0')
ptr++; ptr++;
@ -383,7 +382,7 @@ void parse_syntax(char *ptr)
} }
} }
/* Parse the magic regex that may influence the choice of syntax. */ /* Parse the magic regexes that may influence the choice of syntax. */
void parse_magictype(char *ptr) void parse_magictype(char *ptr)
{ {
#ifdef HAVE_LIBMAGIC #ifdef HAVE_LIBMAGIC
@ -413,10 +412,9 @@ void parse_magictype(char *ptr)
fprintf(stderr, "Starting a magic type: \"%s\"\n", ptr); fprintf(stderr, "Starting a magic type: \"%s\"\n", ptr);
#endif #endif
/* Now load the extensions into their part of the struct. */ /* Now load the magic regexes into their part of the struct. */
while (*ptr != '\0') { while (*ptr != '\0') {
exttype *newext; exttype *newext;
/* The new extension structure. */
while (*ptr != '"' && *ptr != '\0') while (*ptr != '"' && *ptr != '\0')
ptr++; ptr++;
@ -739,7 +737,7 @@ void parse_colors(char *ptr, bool icase)
* in the colorstrings array, woo! */ * in the colorstrings array, woo! */
while (ptr != NULL && *ptr != '\0') { while (ptr != NULL && *ptr != '\0') {
colortype *newcolor; colortype *newcolor;
/* The new color structure. */ /* The container for a color plus its regexes. */
bool cancelled = FALSE; bool cancelled = FALSE;
/* The start expression was bad. */ /* The start expression was bad. */
bool expectend = FALSE; bool expectend = FALSE;
@ -878,7 +876,7 @@ bool parse_color_names(char *combostr, short *fg, short *bg, bool *bright)
return TRUE; return TRUE;
} }
/* Parse the header-line regex that may influence the choice of syntax. */ /* Parse the header-line regexes that may influence the choice of syntax. */
void parse_headers(char *ptr) void parse_headers(char *ptr)
{ {
char *regstr; char *regstr;
@ -896,11 +894,8 @@ void parse_headers(char *ptr)
return; return;
} }
/* Now for the fun part. Start adding regexes to individual strings
* in the colorstrings array, woo! */
while (ptr != NULL && *ptr != '\0') { while (ptr != NULL && *ptr != '\0') {
exttype *newheader; exttype *newheader;
/* The new color structure. */
if (*ptr != '"') { if (*ptr != '"') {
rcfile_error( rcfile_error(