]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.443
- new
[packages/vim.git] / 7.2.443
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.443
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.2.443 
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 
15
16
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
19 ***************
20 *** 451,457 ****
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));
28 --- 451,456 ----
29 ***************
30 *** 7012,7018 ****
31    * If "len" is negative use strlen(key).
32    * Returns NULL when not found.
33    */
34 !     static dictitem_T *
35   dict_find(d, key, len)
36       dict_T    *d;
37       char_u    *key;
38 --- 7011,7017 ----
39    * If "len" is negative use strlen(key).
40    * Returns NULL when not found.
41    */
42 !     dictitem_T *
43   dict_find(d, key, len)
44       dict_T    *d;
45       char_u    *key;
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
48 ***************
49 *** 56,61 ****
50 --- 56,62 ----
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
60 ***************
61 *** 3771,3777 ****
62   static int add_tag_field __ARGS((dict_T *dict, char *field_name, char_u *start, char_u *end));
63   
64   /*
65 !  * Add a tag field to the dictionary "dict"
66    */
67       static int
68   add_tag_field(dict, field_name, start, end)
69 --- 3771,3778 ----
70   static int add_tag_field __ARGS((dict_T *dict, char *field_name, char_u *start, char_u *end));
71   
72   /*
73 !  * Add a tag field to the dictionary "dict".
74 !  * Return OK or FAIL.
75    */
76       static int
77   add_tag_field(dict, field_name, start, end)
78 ***************
79 *** 3783,3788 ****
80 --- 3784,3800 ----
81       char_u    buf[MAXPATHL];
82       int               len = 0;
83   
84 +     /* check that the field name doesn't exist yet */
85 +     if (dict_find(dict, (char_u *)field_name, -1) != NULL)
86 +     {
87 +       if (p_verbose > 0)
88 +       {
89 +           verbose_enter();
90 +           smsg((char_u *)_("Duplicate field name: %s"), field_name);
91 +           verbose_leave();
92 +       }
93 +       return FAIL;
94 +     }
95       if (start != NULL)
96       {
97         if (end == NULL)
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
100 ***************
101 *** 683,684 ****
102 --- 683,686 ----
103   {   /* Add new patch number below this line */
104 + /**/
105 +     443,
106   /**/
107
108 -- 
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.
112
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    ///
This page took 0.035557 seconds and 3 git commands to generate.