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 | 3127746e1c5864e767914a2fbeaf4564be79e2c8 (patch) | |
tree | 7dbabb7d3a52079ddbb213926efae06a13934afa /tag.h | |
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 'tag.h')
-rw-r--r-- | tag.h | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1,6 +1,6 @@ -/* $Id: tag.h,v 1.9 2019/07/27 13:40:57 schwarze Exp $ */ +/* $Id: tag.h,v 1.10 2020/01/20 10:37:15 schwarze Exp $ */ /* - * Copyright (c) 2015, 2018, 2019 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2015, 2018, 2019, 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 @@ -15,6 +15,17 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* + * Tagging priorities. + * Lower numbers indicate higher importance. + */ +#define TAG_MANUAL 1 /* Set with a .Tg macro. */ +#define TAG_STRONG 2 /* Good automatic tagging. */ +#define TAG_WEAK (INT_MAX - 2) /* Dubious automatic tagging. */ +#define TAG_FALLBACK (INT_MAX - 1) /* Tag only used if unique. */ +#define TAG_DELETE (INT_MAX) /* Tag not used at all. */ + + struct tag_files { char ofn[20]; char tfn[20]; |