From: Thomas Rast Date: Tue, 6 Dec 2011 16:35:08 +0000 (+0100) Subject: userdiff: allow * between cpp funcname words X-Git-Tag: v1.7.8.1~2^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=37e7793d473019eac69c347f1a79e3273567b9bf;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/userdiff.c b/userdiff.c index e5522159b..16b5119b1 100644 --- a/userdiff.c +++ b/userdiff.c @@ -74,7 +74,7 @@ PATTERNS("cpp", /* Jump targets or access declarations */ "!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:.*$\n" /* 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 */ "^((struct|class|enum)[^;]*)$", /* -- */