userdiff: allow * between cpp funcname words
The cpp pattern, used for C and C++, would not match the start of a declaration such as static char *prepare_index(int argc, because it did not allow for * anywhere between the various words that constitute the modifiers, type and function name. Fix it. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast committed
Dec 6, 2011 at 17:35 UTC
37e7793d473019eac69c347f1a79e3273567b9bf
1 file changed
+1
-1
userdiff.c
+1
-1
@@ -74,7 +74,7 @@ PATTERNS("cpp",
74
/* Jump targets or access declarations */
75
"!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:.*$\n"
76
/* C/++ functions/methods at top level */
77
- "^([A-Za-z_][A-Za-z_0-9]*([ \t]+[A-Za-z_][A-Za-z_0-9]*([ \t]*::[ \t]*[^[:space:]]+)?){1,}[ \t]*\\([^;]*)$\n"
77
+ "^([A-Za-z_][A-Za-z_0-9]*([ \t*]+[A-Za-z_][A-Za-z_0-9]*([ \t]*::[ \t]*[^[:space:]]+)?){1,}[ \t]*\\([^;]*)$\n"
78
/* compound type at top level */
79
"^((struct|class|enum)[^;]*)$",
80
/* -- */