From 7221f76a236baf4056bfe1c909f3c978a4a94349 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 17 Jul 2015 22:38:29 +0000 Subject: 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@. --- term.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'term.h') diff --git a/term.h b/term.h index 0aa467b4..2db32864 100644 --- a/term.h +++ b/term.h @@ -1,4 +1,4 @@ -/* $Id: term.h,v 1.114 2015/04/29 18:35:00 schwarze Exp $ */ +/* $Id: term.h,v 1.115 2015/07/17 22:38:29 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -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. */ -- cgit v1.2.3-56-ge451