diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2020-01-20 10:37:15 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2020-01-20 10:37:15 +0000 |
commit | bd6f66569773d0cec18ee728ff380ff738d81246 (patch) | |
tree | 755349d1e38fe1ff5e5560241ddee1249d859f40 /man_term.c | |
parent | c52cbdd1ba579d2163f2000582c15c6002df18e9 (diff) | |
download | mandoc-bd6f66569773d0cec18ee728ff380ff738d81246.tar.gz |
Make the code more readable by introducing
symbolic constants for tagging priorities.
This review also made me find a minor bug: do not upgrade
TAG_FALLBACK to TAG_WEAK when there is trailing whitespace.
Diffstat (limited to 'man_term.c')
-rw-r--r-- | man_term.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,7 +1,7 @@ /* $Id$ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> - * Copyright (c) 2010-2015, 2017-2019 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -1180,12 +1180,12 @@ tag_man(struct termp *p, struct roff_node *n) assert(n->type == ROFFT_TEXT); cp = n->string; - prio = 1; + prio = TAG_STRONG; for (;;) { switch (*cp) { case ' ': case '\t': - prio = INT_MAX; + prio = TAG_WEAK; /* FALLTHROUGH */ case '-': cp++; |