summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-02-18 18:00:20 -0500
committerJune McEnroe <june@causal.agency>2019-02-18 18:00:20 -0500
commit73590ef5aef53bcb6cac0583363ddd1fdbe3b28c (patch)
tree09fd4a8ca7f59b5875bb307ebaf5d2dad750a8ba
parentClean up htmlHeader (diff)
downloadsrc-73590ef5aef53bcb6cac0583363ddd1fdbe3b28c.tar.gz
src-73590ef5aef53bcb6cac0583363ddd1fdbe3b28c.zip
Match statics and typedefs as Tag
-rw-r--r--bin/hi.c5
-rw-r--r--bin/man1/hi.12
2 files changed, 5 insertions, 2 deletions
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
d68e36719f3c6a808f8d8adc905da7250&follow=1'>Apply consecutive formatting codes at onceJune McEnroe 2018-09-14Add tests for formatParseJune McEnroe 2018-09-13Preview with nick in input windowJune McEnroe 2018-09-13Never send PRIVMSG to TagStatus or TagVerboseJune McEnroe 2018-09-13Move color selection to format.cJune McEnroe 2018-09-13Fix len for format->split at end of stringJune McEnroe 2018-09-13Avoid uninitialized x in uiReadJune McEnroe 2018-09-13Add IRCDefault to colors enumJune McEnroe 2018-09-13Return a format->split even at the end of the stringJune McEnroe 2018-09-13Fix weird tab-complete after commaJune McEnroe 2018-09-13Rewrite UI againJune McEnroe 2018-09-12Add note about C-oJune McEnroe 2018-09-12Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe