From 3127746e1c5864e767914a2fbeaf4564be79e2c8 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 20 Jan 2020 10:37:15 +0000 Subject: 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. --- man_term.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'man_term.c') diff --git a/man_term.c b/man_term.c index d9ee14ad..553063dc 100644 --- a/man_term.c +++ b/man_term.c @@ -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 - * Copyright (c) 2010-2015, 2017-2019 Ingo Schwarze + * Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze * * 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++; -- cgit v1.2.3