bug: gtags not respecting .ctags files
Gis Ochre <[email protected]> Fri, 9 Aug 2019 01:06:09 +0300
| Newsgroups | gmane.comp.gnu.global.bugs |
|---|---|
| Message-ID | <CAF4sATY9Knjz9o4Njxk4LPVkkpEKA4QyZBCkJmberubQmXEn=g@mail.gmail.com> |
Hello, everyone! Problem described in detail in https://github.com/universal-ctags/ctags/issues/1608. Can confirm that cornercase patch.diff fixed the issue for me. _______________________________________________ Bug-global mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-global
patch.diff
(text/x-patch, 1.2 KB)
--- exuberant-ctags.prev.c 2019-08-09 00:17:19.408405238 +0300
+++ exuberant-ctags.c 2019-08-09 00:42:44.700113001 +0300
@@ -177,7 +177,7 @@
static pid_t pid;
static char *argv[] = {
"ctags",
- ""
+ "--options=/home/user/.ctags.d/custom.ctags",
NULL,
#if defined(USE_EXTRA_FIELDS)
"--_xformat=%R %-16N %4n %-16F %C",
@@ -202,11 +202,11 @@
if (!ctagscom || !strlen(ctagscom) || !strcmp(ctagscom, "no"))
param->die(ctagsnotfound);
argv[0] = ctagscom;
- argv[1] = malloc(sizeof(LANGMAP_OPTION) + strlen(param->langmap));
- if (argv[1] == NULL)
+ argv[2] = malloc(sizeof(LANGMAP_OPTION) + strlen(param->langmap));
+ if (argv[2] == NULL)
param->die("short of memory.");
- memcpy(argv[1], LANGMAP_OPTION, sizeof(LANGMAP_OPTION) - 1);
- copy_langmap_converting_cpp(argv[1] + sizeof(LANGMAP_OPTION) - 1, param->langmap);
+ memcpy(argv[2], LANGMAP_OPTION, sizeof(LANGMAP_OPTION) - 1);
+ copy_langmap_converting_cpp(argv[2] + sizeof(LANGMAP_OPTION) - 1, param->langmap);
if (pipe(opipe) < 0 || pipe(ipipe) < 0)
param->die("cannot create pipe.");
@@ -227,7 +227,7 @@
if (pid < 0)
param->die("fork failed.");
free(path);
- free(argv[1]);
+ free(argv[2]);
close(opipe[0]);
close(ipipe[1]);
ip = fdopen(ipipe[0], "r");