summaryrefslogtreecommitdiff
path: root/userdiff.c
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2011-12-06 16:35:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-12-06 21:16:37 (GMT)
commit37e7793d473019eac69c347f1a79e3273567b9bf (patch)
tree787f815da06f1243830ad0863d33205d36afda79 /userdiff.c
parent87b50542a08ac6caa083ddc376e674424e37940a (diff)
downloadgit-37e7793d473019eac69c347f1a79e3273567b9bf.zip
git-37e7793d473019eac69c347f1a79e3273567b9bf.tar.gz
git-37e7793d473019eac69c347f1a79e3273567b9bf.tar.bz2
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>
Diffstat (limited to 'userdiff.c')
-rw-r--r--userdiff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c
index e552215..16b5119 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)[^;]*)$",
/* -- */