diff options
author | Francesco Potortì <[email protected]> | 2006-12-28 00:05:53 +0000 |
---|---|---|
committer | Francesco Potortì <[email protected]> | 2006-12-28 00:05:53 +0000 |
commit | 6598a3d4225d702e81378d958c44b2e011781d2e (patch) | |
tree | eb4f2554872583bba6b355ce2e4af165361128f0 /lib-src | |
parent | 17d5f8a676acddb92053852b58037eebe87f56bd (diff) |
(readline): When creating a relative file name from a
#line directive, leave the file name alone. The previous
behaviour was to make it relative to the tags file directory,
under the hypothesis that the #line directive file name was
relative to the directory of the tagged file. That hypothesis is
wrong with Cpp and Lex.
(Makefile_targets): Do not include spaces in tag names.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/etags.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 3a976c3d75..c4f7fdc4d6 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -41,7 +41,7 @@ * configuration file containing regexp definitions for etags. */ -char pot_etags_version[] = "@(#) pot revision number is 17.23"; +char pot_etags_version[] = "@(#) pot revision number is 17.25"; #define TRUE 1 #define FALSE 0 @@ -4686,8 +4686,16 @@ Makefile_targets (inf) while (*bp != '\0' && *bp != '=' && *bp != ':') bp++; if (*bp == ':' || (globals && *bp == '=')) - make_tag (lb.buffer, bp - lb.buffer, TRUE, - lb.buffer, bp - lb.buffer + 1, lineno, linecharno); + { + /* We should detect if there is more than one tag, but we do not. + We just skip initial and final spaces. */ + char * namestart = skip_spaces (lb.buffer); + while (--bp > namestart) + if (!notinname (*bp)) + break; + make_tag (namestart, bp - namestart + 1, TRUE, + lb.buffer, bp - lb.buffer + 2, lineno, linecharno); + } } } @@ -6277,7 +6285,7 @@ readline (lbp, stream) name = lbp->buffer + start; *endp = '\0'; canonicalize_filename (name); /* for DOS */ - taggedabsname = absolute_filename (name, curfdp->infabsdir); + taggedabsname = absolute_filename (name, tagfiledir); if (filename_is_absolute (name) || filename_is_absolute (curfdp->infname)) taggedfname = savestr (taggedabsname); |