home *** CD-ROM | disk | FTP | other *** search
- To: vim-dev@vim.org
- Subject: Patch 5.6.095
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- ------------
-
- Patch 5.6.095
- Problem: With an Emacs TAGS file that include another a relative path
- doesn't always work.
- Solution: Use expand_tag_fname() on the name of the included file.
- (Utz-Uwe Haus)
- Files: src/tag.c
-
-
- *** ../vim-5.6.94/src/tag.c Mon Jun 5 11:24:35 2000
- --- src/tag.c Thu Jun 8 20:56:56 2000
- ***************
- *** 1206,1226 ****
- if (STRNCMP(p + 1, "include", 7) == 0
- && incstack_idx < INCSTACK_SIZE)
- {
- if ((incstack[incstack_idx].etag_fname =
- vim_strsave(tag_fname)) != NULL)
- {
- incstack[incstack_idx].fp = fp;
- ! if ((fp = mch_fopen((char *)ebuf, "r")) == NULL)
- {
- ! fp = incstack[incstack_idx].fp;
- ! vim_free(incstack[incstack_idx].etag_fname);
- }
- ! else
- {
- ! STRCPY(tag_fname, ebuf);
- ! ++incstack_idx;
- }
- - is_etag = 0; /* we can include anything */
- }
- }
- }
- --- 1205,1244 ----
- if (STRNCMP(p + 1, "include", 7) == 0
- && incstack_idx < INCSTACK_SIZE)
- {
- + /* Save current "fp" and "tag_fname" in the stack. */
- if ((incstack[incstack_idx].etag_fname =
- vim_strsave(tag_fname)) != NULL)
- {
- + char_u *fullpath_ebuf;
- +
- incstack[incstack_idx].fp = fp;
- ! fp = NULL;
- !
- ! /* Figure out "tag_fname" and "fp" to use for
- ! * included file. */
- ! fullpath_ebuf = expand_tag_fname(ebuf,
- ! tag_fname, FALSE);
- ! if (fullpath_ebuf != NULL)
- {
- ! fp = mch_fopen((char *)fullpath_ebuf, "r");
- ! if (fp != NULL)
- ! {
- ! if (STRLEN(fullpath_ebuf) > LSIZE)
- ! EMSG2("Tag file path trucated for %s\n", ebuf);
- ! STRNCPY(tag_fname, fullpath_ebuf, LSIZE);
- ! tag_fname[LSIZE] = NUL;
- ! ++incstack_idx;
- ! is_etag = 0; /* we can include anything */
- ! }
- ! vim_free(fullpath_ebuf);
- }
- ! if (fp == NULL)
- {
- ! /* Can't open the included file, skip it and
- ! * restore old value of "fp". */
- ! fp = incstack[incstack_idx].fp;
- ! vim_free(incstack[incstack_idx].etag_fname);
- }
- }
- }
- }
- *** ../vim-5.6.94/src/version.c Wed Jun 7 14:04:31 2000
- --- src/version.c Thu Jun 8 20:53:00 2000
- ***************
- *** 420,421 ****
- --- 420,423 ----
- { /* Add new patch number below this line */
- + /**/
- + 95,
- /**/
-
- --
- Female engineers become irresistible at the age of consent and remain that
- way until about thirty minutes after their clinical death. Longer if it's a
- warm day.
- (Scott Adams - The Dilbert principle)
-
- /-/-- Bram Moolenaar --- Bram@moolenaar.net --- http://www.moolenaar.net --\-\
- \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
-