bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62257] [man] don't slice the center footer in the middle of an esc


From: G. Branden Robinson
Subject: [bug #62257] [man] don't slice the center footer in the middle of an escape sequence
Date: Tue, 5 Apr 2022 20:22:43 -0400 (EDT)

Follow-up Comment #1, bug #62257 (project groff):

Note the lack of file name and line number for the diagnostic message.  Looks
like that would be pretty hard to fix since the error is only recognized very
late in processing.  I took the document and manually preconv-ed it, then
this.


##(gdb) set args -F font -F build/font -M tmac -M build/tmac -z -Ww -Tutf8
-man man.5
##(gdb) break copy_mode_error
Breakpoint 1 at 0x61e53: file ../src/roff/troff/input.cpp, line 8731.
##(gdb) run
Starting program: /home/branden/src/GIT/groff/build/troff -F font -F
build/font -M tmac -M build/tmac -z -Ww -Tutf8 -man man.5

Breakpoint 1, copy_mode_error (format=0x5555555e2bd0 "%1 not allowed in escape
sequence parameter", arg1=..., arg2=..., arg3=...)
    at ../src/roff/troff/input.cpp:8731
8731      if (ignoring) {
##(gdb) bt
#0  copy_mode_error (format=0x5555555e2bd0 "%1 not allowed in escape sequence
parameter", arg1=..., arg2=..., arg3=...)
    at ../src/roff/troff/input.cpp:8731
#1  0x000055555559f403 in get_char_for_escape_parameter (allow_space=true) at
../src/roff/troff/input.cpp:840
#2  0x000055555559f4bf in read_long_escape_parameters (mode=WITH_ARGS) at
../src/roff/troff/input.cpp:871
#3  0x00005555555a3073 in token::next (this=0x55555561ccc0 <tok>) at
../src/roff/troff/input.cpp:2259
#4  0x00005555555abb4c in do_width () at ../src/roff/troff/input.cpp:5253
#5  0x00005555555a2da8 in token::next (this=0x55555561ccc0 <tok>) at
../src/roff/troff/input.cpp:2199
#6  0x00005555555d1345 in start_number () at ../src/roff/troff/number.cpp:218
#7  0x00005555555d1286 in get_incr_number (res=0x7fffffffd94c, si=117 'u') at
../src/roff/troff/number.cpp:198
#8  0x00005555555d115e in get_number (res=0x7fffffffd96c, si=117 'u',
prev_value=0) at ../src/roff/troff/number.cpp:156
#9  0x00005555555d33ed in define_number_reg () at
../src/roff/troff/reg.cpp:313
#10 0x00005555555a4d61 in request::invoke (this=0x5555556a1520) at
../src/roff/troff/input.cpp:3081
#11 0x00005555555a6f02 in interpolate_macro (nm=..., no_next=0) at
../src/roff/troff/input.cpp:3807
#12 0x00005555555a473d in process_input_stack () at
../src/roff/troff/input.cpp:2849
#13 0x00005555555a3eb9 in exit_troff () at ../src/roff/troff/input.cpp:2575
#14 0x00005555555b3943 in main (argc=14, argv=0x7fffffffdd18) at
../src/roff/troff/input.cpp:8230
##(gdb) quit


I suspect to fix this we'd need special nodes that embedded file name and line
number information.  And I don't see any point adding node types before we
make ourselves friendly to UTF-8 input.  So...that bit goes into the future.

A refactor of "an-prepare-inner-footer" can happen now, though.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62257>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]