To: vim-dev@vim.org Subject: Patch 6.1.425 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.425 Problem: ":helptags $VIMRUNTIME/doc" does not add the "help-tags" tag. Solution: Do add the "help-tags" tag for that specific directory. Files: src/ex_cmds.c *** ../vim61.424/src/ex_cmds.c Wed Mar 26 21:48:04 2003 --- src/ex_cmds.c Sat Mar 29 12:38:42 2003 *************** *** 4984,4992 **** } /* ! * Go over all the files and extract the tags. */ ga_init2(&ga, (int)sizeof(char_u *), 100); for (fi = 0; fi < filecount && !got_int; ++fi) { fd = fopen((char *)files[fi], "r"); --- 4984,5013 ---- } /* ! * If generating tags for "$VIMRUNTIME/doc" add the "help-tags" tag. */ ga_init2(&ga, (int)sizeof(char_u *), 100); + if (fullpathcmp((char_u *)"$VIMRUNTIME/doc", eap->arg, FALSE) == FPC_SAME) + { + if (ga_grow(&ga, 1) == FAIL) + got_int = TRUE; + else + { + s = vim_strsave((char_u *)"help-tags\ttags\t1\n"); + if (s == NULL) + got_int = TRUE; + else + { + ((char_u **)ga.ga_data)[ga.ga_len] = s; + ++ga.ga_len; + --ga.ga_room; + } + } + } + + /* + * Go over all the files and extract the tags. + */ for (fi = 0; fi < filecount && !got_int; ++fi) { fd = fopen((char *)files[fi], "r"); *************** *** 5088,5102 **** for (i = 0; i < ga.ga_len; ++i) { s = ((char_u **)ga.ga_data)[i]; ! fprintf(fd_tags, "%s\t/*", s); ! for (p1 = s; *p1 != '\t'; ++p1) { ! /* insert backslash before '\\' and '/' */ ! if (*p1 == '\\' || *p1 == '/') ! putc('\\', fd_tags); ! putc(*p1, fd_tags); } - fprintf(fd_tags, "*\n"); } } --- 5109,5129 ---- for (i = 0; i < ga.ga_len; ++i) { s = ((char_u **)ga.ga_data)[i]; ! if (STRNCMP(s, "help-tags\t", 10) == 0) ! /* help-tags entry was added in formatted form */ ! fprintf(fd_tags, s); ! else { ! fprintf(fd_tags, "%s\t/*", s); ! for (p1 = s; *p1 != '\t'; ++p1) ! { ! /* insert backslash before '\\' and '/' */ ! if (*p1 == '\\' || *p1 == '/') ! putc('\\', fd_tags); ! putc(*p1, fd_tags); ! } ! fprintf(fd_tags, "*\n"); } } } *** ../vim61.424/src/version.c Mon Mar 31 20:07:27 2003 --- src/version.c Mon Mar 31 20:10:47 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 425, /**/ -- A cow comes flying over the battlements, lowing aggressively. The cow lands on GALAHAD'S PAGE, squashing him completely. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///