summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.379
blob: fd87f9a1e69572f2d61fab90df63c47a6a18b987 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
To: vim_dev@googlegroups.com
Subject: Patch 7.3.379
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.379
Problem:    C-indenting wrong for static enum.
Solution:   Skip over "static". (Lech Lorens)
Files:	    src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok


*** ../vim-7.3.378/src/misc1.c	2011-11-30 17:20:18.000000000 +0100
--- src/misc1.c	2011-12-14 19:37:48.000000000 +0100
***************
*** 5138,5143 ****
--- 5138,5146 ----
      if (STRNCMP(s, "typedef", 7) == 0 && !vim_isIDc(s[7]))
  	s = cin_skipcomment(s + 7);
  
+     if (STRNCMP(s, "static", 6) == 0 && !vim_isIDc(s[6]))
+ 	s = cin_skipcomment(s + 6);
+ 
      if (STRNCMP(s, "enum", 4) == 0 && !vim_isIDc(s[4]))
  	return TRUE;
  
*** ../vim-7.3.378/src/testdir/test3.in	2011-11-30 17:20:18.000000000 +0100
--- src/testdir/test3.in	2011-12-14 20:03:11.000000000 +0100
***************
*** 299,316 ****
  
  enum soppie
  {
! 	yes = 0,
! 	no,
! 	maybe
  };
  
  typedef enum soppie
  {
! 	yes = 0,
! 	no,
! 	maybe
  };
  
  {
  	int a,
  		b;
--- 299,323 ----
  
  enum soppie
  {
! yes = 0,
! no,
! maybe
  };
  
  typedef enum soppie
  {
! yes = 0,
! no,
! maybe
  };
  
+ static enum
+ {
+ yes = 0,
+ no,
+ maybe
+ } soppie;
+ 
  {
  	int a,
  		b;
*** ../vim-7.3.378/src/testdir/test3.ok	2011-11-30 17:20:18.000000000 +0100
--- src/testdir/test3.ok	2011-12-14 19:37:48.000000000 +0100
***************
*** 299,304 ****
--- 299,311 ----
  	maybe
  };
  
+ static enum
+ {
+ 	yes = 0,
+ 	no,
+ 	maybe
+ } soppie;
+ 
  {
  	int a,
  		b;
*** ../vim-7.3.378/src/version.c	2011-12-14 19:22:29.000000000 +0100
--- src/version.c	2011-12-14 20:02:19.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     379,
  /**/

-- 
You cannot propel yourself forward by patting yourself on the back.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///