summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-01-20 10:37:15 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-01-20 10:37:15 +0000
commitbd6f66569773d0cec18ee728ff380ff738d81246 (patch)
tree755349d1e38fe1ff5e5560241ddee1249d859f40 /man_term.c
parentc52cbdd1ba579d2163f2000582c15c6002df18e9 (diff)
downloadmandoc-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/man_term.c b/man_term.c
index 9ec64768..e25f7c74 100644
--- a/man_term.c
+++ b/man_term.c
@@ -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++;