From 3a6dd371c0b5b8249b57763bce8b761dee55161e Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Fri, 6 Apr 2018 12:11:33 +0900 Subject: [PATCH 1/6] main,style: rename function parameter names `parameterx' may be typo. I cannot find any issue if I rename it to `parameter'. Signed-off-by: Masatake YAMATO --- main/parse.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main/parse.c b/main/parse.c index d4e43982b3..02836dea69 100644 --- a/main/parse.c +++ b/main/parse.c @@ -2146,13 +2146,13 @@ static flagDefinition PreKindDefFlagDef [] = { static bool processLangDefineKind(const langType language, const char *const option, - const char *const parameterx) + const char *const parameter) { parserObject *parser; kindDefinition *kdef; int letter; - const char * p = parameterx; + const char * p = parameter; char *name; char *description; const char *tmp_start; @@ -2246,14 +2246,14 @@ static void freeRdef (roleDefinition *rdef) static bool processLangDefineRole(const langType language, const char *const option, - const char *const parameterx) + const char *const parameter) { parserObject *parser; kindDefinition *kdef; roleDefinition *rdef; int kletter; - const char * p = parameterx; + const char * p = parameter; char *name; char *description; const char *tmp_start; @@ -2855,10 +2855,10 @@ static void xtagDefinitionDestroy (xtagDefinition *xdef) static bool processLangDefineExtra (const langType language, const char *const option, - const char *const parameterx) + const char *const parameter) { xtagDefinition *xdef; - const char * p = parameterx; + const char * p = parameter; const char *name_end; const char *desc; const char *flags; @@ -2891,7 +2891,7 @@ static bool processLangDefineExtra (const langType language, xdef = xCalloc (1, xtagDefinition); xdef->enabled = false; xdef->letter = NUL_XTAG_LETTER; - xdef->name = eStrndup (parameterx, name_end - parameterx); + xdef->name = eStrndup (parameter, name_end - parameter); xdef->description = desc; xdef->isEnabled = NULL; DEFAULT_TRASH_BOX(xdef, xtagDefinitionDestroy); From b8e4238d5bd492cbd6939435e8b65bf0e08e8e58 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Fri, 6 Apr 2018 13:13:08 +0900 Subject: [PATCH 2/6] main,comment: describe local variables in parserTagRegex func Signed-off-by: Masatake YAMATO --- main/lregex.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/lregex.c b/main/lregex.c index b0072bc5bc..db616efd5f 100644 --- a/main/lregex.c +++ b/main/lregex.c @@ -349,6 +349,12 @@ static bool parseTagRegex ( error (WARNING, "%s: regexp missing final separator", regexp); else { + /* + * first----------V third------------V + * --regex-=/regexp/replacement/[kind-spec/][flags] + * second----------------^ fourth---------------^ + */ + char* const fourth = scanSeparators (third, false); if (*fourth == separator) { From 773bcc64c7b3ae7604cd1a5a3dd4810458fe4d77 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Sun, 15 Apr 2018 19:01:59 +0900 Subject: [PATCH 3/6] docs(man): replace ---kinds with --kinds- Signed-off-by: Masatake YAMATO --- man/ctags.1.rst.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/ctags.1.rst.in b/man/ctags.1.rst.in index c546f100c3..bfc4fe2561 100644 --- a/man/ctags.1.rst.in +++ b/man/ctags.1.rst.in @@ -1541,7 +1541,7 @@ file kind Indicates the type, or kind, of tag. Its value is either one of the corresponding one-letter flags described under the various - ``---kinds`` options above, or a full name. It is permitted + ``--kinds-`` options above, or a full name. It is permitted (and is, in fact, the default) for the key portion of this field to be omitted. The optional behaviors are controlled with the ``--fields`` option. From 44c27a07f6eb5a4432a0e7b93769fb5269452302 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Sun, 15 Apr 2018 19:05:46 +0900 Subject: [PATCH 4/6] misc/budge: refer .ctags.d instead of .ctags Signed-off-by: Masatake YAMATO --- misc/budge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/budge b/misc/budge index cee08b5d54..f52edc46f7 100644 --- a/misc/budge +++ b/misc/budge @@ -53,7 +53,7 @@ while [ $# -gt 0 ]; do shift done -CMDLINE="${CTAGS_TEST} --quiet --options=NONE -G --options=./.ctags --languages=all --options=misc/budge.ctags -R --print-language" +CMDLINE="${CTAGS_TEST} --quiet --options=NONE -G --options=./.ctags.d --languages=all --options=misc/budge.ctags -R --print-language" ALL_FILES=$(git ls-files) TOTAL=0 From 7e45c1df2e127b63652a7baaf8ba13b025d7c09c Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Thu, 19 Apr 2018 20:19:04 +0900 Subject: [PATCH 5/6] misc/budge: use --options-maybe instead of --options So we can reuse the script for source code trees other than u-ctags. Signed-off-by: Masatake YAMATO --- misc/budge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/budge b/misc/budge index f52edc46f7..7faa4e6422 100644 --- a/misc/budge +++ b/misc/budge @@ -53,7 +53,7 @@ while [ $# -gt 0 ]; do shift done -CMDLINE="${CTAGS_TEST} --quiet --options=NONE -G --options=./.ctags.d --languages=all --options=misc/budge.ctags -R --print-language" +CMDLINE="${CTAGS_TEST} --quiet --options=NONE -G --options-maybe=./.ctags.d --languages=all --options-maybe=misc/budge.ctags -R --print-language" ALL_FILES=$(git ls-files) TOTAL=0 From d3f580eb97472d53e16665bc7ed1fe55e7cf7e3b Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Fri, 18 May 2018 15:07:57 +0900 Subject: [PATCH 6/6] docs(web): write about the meta description of tags file format Signed-off-by: Masatake YAMATO --- docs/format.rst | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/format.rst b/docs/format.rst index aec95fb053..36bd875d86 100644 --- a/docs/format.rst +++ b/docs/format.rst @@ -6,9 +6,13 @@ Proposal for extended Vi tags file format The contents of next section is a copy of FORMAT file in exuberant ctags source code in its subversion repository at sourceforge.net. - I(Masatake YAMATO) changed only its format in the most of all - parts. I added a subsection for showing the position of universal - ctags. + + We have made some modifications: + + * Exceptions introduced in Universal-ctags are explained with + "EXCEPTION" marker. + + * `Exceptions in Universal-ctags`_ subsction summarizes the exceptions. .. contents:: `Table of contents` :depth: 3 @@ -100,7 +104,7 @@ This restricts the format to what Vi can handle. The format is: {tagname} Any identifier, not containing white space.. - EXCEPTION: Universal ctags violates this item of the proposal; + EXCEPTION: Universal-ctags violates this item of the proposal; tagname may contain spaces. However, tabs are not allowed. @@ -223,7 +227,7 @@ Use a comment after the {tagaddress} field. The format would be:: {tagname} Any identifier, not containing white space.. - EXCEPTION: Universal ctags violates this item of the proposal; + EXCEPTION: Universal-ctags violates this item of the proposal; name may contain spaces. However, tabs are not allowed. Conversion, for some characters including in the "value", explained in the last of this section is applied. @@ -268,7 +272,7 @@ A tagfield has a name, a colon, and a value: "name:value". Warning: When a tagfield value holds an MS-DOS file name, the backslashes must be doubled! - EXCEPTION: Universal ctags introduces more conversion rules. + EXCEPTION: Universal-ctags introduces more conversion rules. - When a value contains a "\\a", this stands for a (0x07). - When a value contains a "\\b", this stands for a (0x08). @@ -462,17 +466,17 @@ file, and provided solely for documentation purposes:: !_TAG_PROGRAM_URL {URL} /optional comment/ !_TAG_PROGRAM_VERSION {version-id} /optional comment/ -Universal ctags +Exceptions in Universal-ctags -------------------------------- -Universal ctags supports this proposal with some +Universal-ctags supports this proposal with some exceptions. Exceptions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#. {tagname} in tags file generated by Universal ctags may contain +#. {tagname} in tags file generated by Universal-ctags may contain spaces and several escape sequences. Parsers for documents like Tex and reStructuredText, or liberal languages such as JavaScript need these exceptions. See {tagname} of Proposal section for more detail about the