diff --git a/ChangeLog b/ChangeLog index 8078dbbdcd7f8904628d1acdb9f764db4cdfd63a..a913c0befb53001f74f844eb1bfcf889aa0d7939 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2016-02-28 Benno Schulenberg <bensberg@justemail.net> * src/nano.h, src/rcfile.c, src/color.c: Rename a struct member. * src/rcfile.c (parse_rcfile): Don't allocate struct for none syntax. + * src/nano.h, src/rcfile.c: Arrange some things more orderly. 2016-02-28 Benno Schulenberg <bensberg@justemail.net> * src/rcfile.c (parse_header_exp): Don't continue when something is diff --git a/src/nano.h b/src/nano.h index cef9167a71b10d655d2b927f65930e0026fe8084..a2f6ee6dcd08c76e16cbc299d6d304896fcf2dec 100644 --- a/src/nano.h +++ b/src/nano.h @@ -246,14 +246,14 @@ typedef struct syntaxtype { /* The list of headerlines that this syntax applies to. */ regexlisttype *magics; /* The list of libmagic results that this syntax applies to. */ - colortype *color; - /* The colors used in this syntax. */ char *linter; - /* The command to lint this type of file. */ + /* The command with which to lint this type of file. */ char *formatter; - /* Use this formatter command (for programming lang mainly) */ + /* The formatting command (for programming languages mainly). */ + colortype *color; + /* The colors and their regexes used in this syntax. */ int nmultis; - /* How many multi-line strings this syntax has. */ + /* How many multiline regex strings this syntax has. */ struct syntaxtype *next; /* Next syntax. */ } syntaxtype; diff --git a/src/rcfile.c b/src/rcfile.c index ce770aa9d1adf6b3c7cc87f341183af4e75c8f5d..b1928264f84c18db4b89165525da2ceaa2d47d93 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -333,15 +333,15 @@ void parse_syntax(char *ptr) } endsyntax->name = mallocstrcpy(NULL, nameptr); - endsyntax->color = NULL; - endcolor = NULL; endsyntax->extensions = NULL; endsyntax->headers = NULL; endsyntax->magics = NULL; - endsyntax->next = NULL; - endsyntax->nmultis = 0; endsyntax->linter = NULL; endsyntax->formatter = NULL; + endsyntax->color = NULL; + endcolor = NULL; + endsyntax->nmultis = 0; + endsyntax->next = NULL; opensyntax = TRUE;