4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Crash when using cscope and there is a parse error (e.g., line too
12 long). (Alexey I. Froloff)
13 Solution: Pass the actual number of matches to cs_manage_matches() and
14 correctly handle the error situation.
15 Files: src/if_cscope.c
18 *** ../vim-6.3.075/src/if_cscope.c Wed Jun 9 14:56:27 2004
19 --- src/if_cscope.c Tue Jun 7 11:06:19 2005
22 /* vi:set ts=8 sts=4 sw=4:
24 * CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
25 ! * Ported to Win32 by Sergey Khorev <khorev@softlab.ru>
27 * The basic idea/structure of cscope for Vim was borrowed from Nvi. There
28 * might be a few lines of code that look similar to what Nvi has.
30 /* vi:set ts=8 sts=4 sw=4:
32 * CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
33 ! * Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>
35 * The basic idea/structure of cscope for Vim was borrowed from Nvi. There
36 * might be a few lines of code that look similar to what Nvi has.
42 ! (void)cs_manage_matches(matches, contexts, totmatches, Store);
44 return do_tag((char_u *)pat, DT_CSCOPE, 0, forceit, verbose);
50 ! (void)cs_manage_matches(matches, contexts, matched, Store);
52 return do_tag((char_u *)pat, DT_CSCOPE, 0, forceit, verbose);
58 * get parsed cscope output and calls cs_make_vim_style_matches to convert
60 + * When there are no matches sets "*matches_p" to NULL.
63 cs_fill_results(tagstr, totmatches, nummatches_a, matches_p, cntxts_p, matched)
67 } /* for all cscope connections */
72 + /* No matches, free the arrays and return NULL in "*matches_p". */
84 char **dblist = NULL, **pplist = NULL, **fllist = NULL;
86 ! char buf[8]; /* for sprintf " (#%d)" */
88 /* malloc our db and ppath list */
89 dblist = (char **)alloc(CSCOPE_MAX_CONNECTIONS * sizeof(char *));
92 char **dblist = NULL, **pplist = NULL, **fllist = NULL;
94 ! char buf[20]; /* for sprintf " (#%d)" */
96 /* malloc our db and ppath list */
97 dblist = (char **)alloc(CSCOPE_MAX_CONNECTIONS * sizeof(char *));
98 *** ../vim-6.3.075/src/version.c Tue May 31 21:30:24 2005
99 --- src/version.c Tue Jun 7 11:06:46 2005
103 { /* Add new patch number below this line */
109 Despite the cost of living, have you noticed how it remains so popular?
111 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
112 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
113 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
114 \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///