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>
This commit is contained in:
parent
87b50542a0
commit
37e7793d47
@ -74,7 +74,7 @@ PATTERNS("cpp",
|
|||||||
/* Jump targets or access declarations */
|
/* Jump targets or access declarations */
|
||||||
"!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:.*$\n"
|
"!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:.*$\n"
|
||||||
/* C/++ functions/methods at top level */
|
/* C/++ functions/methods at top level */
|
||||||
"^([A-Za-z_][A-Za-z_0-9]*([ \t]+[A-Za-z_][A-Za-z_0-9]*([ \t]*::[ \t]*[^[:space:]]+)?){1,}[ \t]*\\([^;]*)$\n"
|
"^([A-Za-z_][A-Za-z_0-9]*([ \t*]+[A-Za-z_][A-Za-z_0-9]*([ \t]*::[ \t]*[^[:space:]]+)?){1,}[ \t]*\\([^;]*)$\n"
|
||||||
/* compound type at top level */
|
/* compound type at top level */
|
||||||
"^((struct|class|enum)[^;]*)$",
|
"^((struct|class|enum)[^;]*)$",
|
||||||
/* -- */
|
/* -- */
|
||||||
|
Loading…
Reference in New Issue
Block a user