bugGNU roff - Bugs: bug #66088, [grn] should generate and...

 
 

bug #66088: [grn] should generate and interpret `lf` requests

Submitter:  G. Branden Robinson <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 Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Aug 2024 03:29:42 PM UTC, original submission:  

...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);


G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code