diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-07-17 22:35:37 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-07-17 22:35:37 +0000 |
commit | 0381b42e7db3ad95e428335e17a3152c958acbcf (patch) | |
tree | 04f63f6bc53ce13905e608ca75bd773c80d2044e /usr.bin/mandoc/term.h | |
parent | e9be797f463679043f845565402b7bd0928f84a4 (diff) |
Initial, still somewhat experimental implementation to leverage
less(1) -T and :t ctags(1)-like functionality to jump to the
definitions of various terms inside manual pages.
To be polished in the tree, so bear with me and report issues.
Technically, if less(1) is used as a pager, information is collected
by the mdoc(7) terminal formatter, first stored using the ohash
library, then ultimately written to a temporary file which is passed
to less via -T. No change intended for other output formatters or
when running without a pager.
Based on an idea from Kristaps using feedback from many, in particular
phessler@ nicm@ millert@ halex@ doug@ kspillner@ deraadt@.
Diffstat (limited to 'usr.bin/mandoc/term.h')
-rw-r--r-- | usr.bin/mandoc/term.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/term.h b/usr.bin/mandoc/term.h index 47e14f8c813..fd2d6d9d673 100644 --- a/usr.bin/mandoc/term.h +++ b/usr.bin/mandoc/term.h @@ -1,4 +1,4 @@ -/* $OpenBSD: term.h,v 1.58 2015/04/29 18:32:57 schwarze Exp $ */ +/* $OpenBSD: term.h,v 1.59 2015/07/17 22:35:36 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -53,6 +53,7 @@ struct termp { struct rofftbl tbl; /* table configuration */ int synopsisonly; /* print the synopsis only */ int mdocstyle; /* imitate mdoc(7) output */ + size_t line; /* Current output line number. */ size_t defindent; /* Default indent for text. */ size_t defrmargin; /* Right margin of the device. */ size_t lastrmargin; /* Right margin before the last ll. */ |