From 73590ef5aef53bcb6cac0583363ddd1fdbe3b28c Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 18 Feb 2019 18:00:20 -0500 Subject: Match statics and typedefs as Tag --- bin/hi.c | 5 ++++- bin/man1/hi.1 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/hi.c b/bin/hi.c index a96ab902..1eff50bd 100644 --- a/bin/hi.c +++ b/bin/hi.c @@ -93,8 +93,11 @@ static const struct Syntax CSyntax[] = { .pattern = "define" BL1 "(" PATTERN_ID ")" BL0 "[(]" }, { Tag, .subexp = 2, .pattern = "(enum|struct|union)" SP1 "(" PATTERN_ID ")" SP0 "[{]" }, - { Tag, .parent = ~SET(Keyword), .subexp = 1, + { Tag, .parent = ~SET(Keyword), .newline = true, .subexp = 1, .pattern = "(" PATTERN_ID ")" SP0 "[(][^)]*[)]" SP0 "[{]" }, + { Tag, .newline = true, .subexp = 3, .pattern = + "(static|typedef)" SP1 + "(" "(" PATTERN_ID ")" SP0 "([*]|[[][^]]*[]]|[{][^}]*[}])*" SP0 ")+" }, { String, .parent = SET(Macro), .subexp = 1, .pattern = "include" BL0 "(<[^>]*>)" }, { String, diff --git a/bin/man1/hi.1 b/bin/man1/hi.1 index 0d82ca75..b852bf50 100644 --- a/bin/man1/hi.1 +++ b/bin/man1/hi.1 @@ -72,7 +72,7 @@ The options are as follows: .Bl -tag -width "title=..." .It Cm anchor Output tags -(type and function definitions) +(top-level definition names) as anchor links. . .It Cm css Ns = Ns Ar url -- cgit 1.4.1 1'>diff
path: root/bin/dtch.c (unfollow)
Commit message (Expand)Author
2020-06-08Prefix mandoc with exec in about-filterJune McEnroe
2020-06-07Remove mktemp options from mkbuiltins, mktokensJune McEnroe
2020-06-07Cast z_stream fields to size_tJune McEnroe
2020-06-07Call static_assert by _Static_assertJune McEnroe
2020-06-07Add OpenBSD to install.shJune McEnroe
2020-06-03Add The Song of AchillesJune McEnroe
2020-06-01Allow redirecting input in everJune McEnroe
2020-05-31Add %c conversion to c scriptJune McEnroe
2020-05-31Add c script to READMEJune McEnroe
2020-05-31Add c scriptJune McEnroe
2020-05-31Update mdoc source URLsJune McEnroe
2020-05-26Remove unfinished PSF fontsJune McEnroe