URL: <https://savannah.gnu.org/bugs/?66088>
Summary: [grn] should generate and interpret `lf` requests
Group: GNU roff
Submitter: gbranden
Submitted: Wed 14 Aug 2024 03:29:42 PM UTC
Category: Preprocessor grn
Severity: 1 - Wish
Item Group: Feature change
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 14 Aug 2024 03:29:42 PM UTC By: G. Branden Robinson <gbranden>
...like other preprocessors do.
Observe:
$ cat ATTIC/backtrace.groff
.\" A comment line.
.backtrace
.lf 11 filename.groff
.backtrace
$ nroff ATTIC/backtrace.groff
troff: backtrace: file 'ATTIC/backtrace.groff':2
troff: backtrace: file 'filename.groff':11
$ ./build/test-groff -g -T ascii ATTIC/backtrace.groff
troff: backtrace: file '<standard input>':2
troff: backtrace: file 'filename.groff':11
Because, since 1.23.0, the _groff_ `-I` option now implies `-g`, this missing
feature is more noticeable than it used to be, for instance when
"doc/grnexampl.me" produces diagnostics.
This shouldn't be _too_ hard to implement. _libgroff_ already provides
support facilities, and our other preprocessors use them.
$ git grep interpret_lf_args src
src/include/lf.h:bool interpret_lf_args(const char *p);
src/libs/libgroff/lf.cpp:bool interpret_lf_args(const char *p)
src/preproc/eqn/main.cpp: if (interpret_lf_args(linebuf.contents() + 3))
src/preproc/pic/main.cpp: interpret_lf_args(line.contents());
src/preproc/refer/refer.cpp: if (interpret_lf_args(line.contents() + 3))
src/preproc/soelim/soelim.cpp: interpret_lf_args(line.contents());
src/preproc/tbl/main.cpp: interpret_lf_args(line.contents());
src/preproc/tbl/main.cpp:
interpret_lf_args(args.contents());
src/preproc/tbl/main.cpp: interpret_lf_args(line.contents() + 3);
$ git grep normalize_for_lf src
src/include/lf.h:void normalize_for_lf (string &fn);
src/libs/libgroff/lf.cpp:void normalize_for_lf (string &fn)
src/libs/libgroff/lf.cpp:void normalize_for_lf (string &)
src/preproc/eqn/main.cpp: normalize_for_lf(fn);
src/preproc/pic/main.cpp: normalize_for_lf(fn);
src/preproc/preconv/preconv.cpp: normalize_for_lf(fn);
src/preproc/refer/refer.cpp: normalize_for_lf(fn);
src/preproc/soelim/soelim.cpp: normalize_for_lf(whole_filename);
src/preproc/tbl/main.cpp: normalize_for_lf(fn);
src/preproc/tbl/table.cpp: normalize_for_lf(filename);
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66088>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
