4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Using taglist() on a tag file with duplicate fields generates an
12 internal error. (Peter Odding)
13 Solution: Check for duplicate field names.
14 Files: src/eval.c, src/proto/eval.pro, src/tag.c
17 *** ../vim-7.2.442/src/eval.c 2010-05-28 22:06:41.000000000 +0200
18 --- src/eval.c 2010-06-12 19:59:09.000000000 +0200
21 static void dictitem_remove __ARGS((dict_T *dict, dictitem_T *item));
22 static dict_T *dict_copy __ARGS((dict_T *orig, int deep, int copyID));
23 static long dict_len __ARGS((dict_T *d));
24 - static dictitem_T *dict_find __ARGS((dict_T *d, char_u *key, int len));
25 static char_u *dict2string __ARGS((typval_T *tv, int copyID));
26 static int get_dict_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
27 static char_u *echo_string __ARGS((typval_T *tv, char_u **tofree, char_u *numbuf, int copyID));
31 * If "len" is negative use strlen(key).
32 * Returns NULL when not found.
35 dict_find(d, key, len)
39 * If "len" is negative use strlen(key).
40 * Returns NULL when not found.
43 dict_find(d, key, len)
46 *** ../vim-7.2.442/src/proto/eval.pro 2010-01-19 15:51:29.000000000 +0100
47 --- src/proto/eval.pro 2010-06-12 19:59:13.000000000 +0200
51 void dictitem_free __ARGS((dictitem_T *item));
52 int dict_add __ARGS((dict_T *d, dictitem_T *item));
53 int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str));
54 + dictitem_T *dict_find __ARGS((dict_T *d, char_u *key, int len));
55 char_u *get_dict_string __ARGS((dict_T *d, char_u *key, int save));
56 long get_dict_number __ARGS((dict_T *d, char_u *key));
57 char_u *get_function_name __ARGS((expand_T *xp, int idx));
58 *** ../vim-7.2.442/src/tag.c 2010-02-24 14:46:58.000000000 +0100
59 --- src/tag.c 2010-06-12 20:01:45.000000000 +0200
62 static int add_tag_field __ARGS((dict_T *dict, char *field_name, char_u *start, char_u *end));
65 ! * Add a tag field to the dictionary "dict"
68 add_tag_field(dict, field_name, start, end)
70 static int add_tag_field __ARGS((dict_T *dict, char *field_name, char_u *start, char_u *end));
73 ! * Add a tag field to the dictionary "dict".
74 ! * Return OK or FAIL.
77 add_tag_field(dict, field_name, start, end)
84 + /* check that the field name doesn't exist yet */
85 + if (dict_find(dict, (char_u *)field_name, -1) != NULL)
90 + smsg((char_u *)_("Duplicate field name: %s"), field_name);
98 *** ../vim-7.2.442/src/version.c 2010-06-05 12:49:40.000000000 +0200
99 --- src/version.c 2010-06-12 20:05:27.000000000 +0200
103 { /* Add new patch number below this line */
109 hundred-and-one symptoms of being an internet addict:
110 191. You rate eating establishments not by the quality of the food,
111 but by the availability of electrical outlets for your PowerBook.
113 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
114 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
115 \\\ download, build and distribute -- http://www.A-A-P.org ///
116 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///