diff options
author | 2020-01-20 10:37:15 +0000 | |
---|---|---|
committer | 2020-01-20 10:37:15 +0000 | |
commit | 3127746e1c5864e767914a2fbeaf4564be79e2c8 (patch) | |
tree | 7dbabb7d3a52079ddbb213926efae06a13934afa /man_term.c | |
parent | 23f80e14e78282088dabbf1cfe358c07030dc9e7 (diff) | |
download | mandoc-3127746e1c5864e767914a2fbeaf4564be79e2c8.tar.gz mandoc-3127746e1c5864e767914a2fbeaf4564be79e2c8.tar.zst mandoc-3127746e1c5864e767914a2fbeaf4564be79e2c8.zip |
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 | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,7 +1,7 @@ -/* $Id: man_term.c,v 1.232 2019/07/23 17:53:35 schwarze Exp $ */ +/* $Id: man_term.c,v 1.233 2020/01/20 10:37:15 schwarze Exp $ */ /* * 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++; |