gbranden pushed a commit to branch master in repository groff. commit 881a436e9ee00e131031b59b1471d715176bf634 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Tue Feb 4 05:53:31 2025 -0600
[troff]: Drop `phcode` request. ...introduced on 4 November. The experimental new `pchar` request handles that job and more. * src/roff/troff/input.cpp (report_hyphenation_codes): Drop request handler. (init_input_requests): Unwire `phcode` request from handler. * src/utils/grog/grog.pl (interpret_line): Unrecognize `phcode` as a GNU troff request. * NEWS: Drop item. * doc/groff.texi.in (Manipulating Hyphenation, Debugging): * man/groff.7.man (Request short reference, Debugging): * man/groff_diff.7.man (New requests, Debugging): Replace documentation of `phcode` with terse documentation of `pchar`, noting its experimental status. --- ChangeLog | 19 +++++++++++++++++++ NEWS | 3 --- doc/groff.texi.in | 17 +++++++++-------- man/groff.7.man | 18 +++++++++--------- man/groff_diff.7.man | 28 +++++++++++++--------------- src/roff/troff/input.cpp | 38 -------------------------------------- src/utils/grog/grog.pl | 2 +- 7 files changed, 51 insertions(+), 74 deletions(-) diff --git a/ChangeLog b/ChangeLog index ddb08d0de..e0be30d76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2025-02-04 G. Branden Robinson <g.branden.robin...@gmail.com> + + Drop `phcode` request introduced on 4 November. The + experimental new `pchar` request handles that job and more. + + * src/roff/troff/input.cpp (report_hyphenation_codes): Drop + request handler. + (init_input_requests): Unwire `phcode` request from handler. + + * src/utils/grog/grog.pl (interpret_line): Unrecognize `phcode` + as a GNU troff request. + + * NEWS: Drop item. + * doc/groff.texi.in (Manipulating Hyphenation, Debugging): + * man/groff.7.man (Request short reference, Debugging): + * man/groff_diff.7.man (New requests, Debugging): Replace + documentation of `phcode` with terse documentation of `pchar`, + noting its experimental status. + 2025-02-04 G. Branden Robinson <g.branden.robin...@gmail.com> [troff]: Add experimental charinfo dump feature. diff --git a/NEWS b/NEWS index bf71f3a35..d9efeb4d5 100644 --- a/NEWS +++ b/NEWS @@ -174,9 +174,6 @@ troff * A new request, `pcomposite`, reports to the standard error stream the list of defined composite characters. -* A new request, `phcode`, reports to the standard error stream the - hyphenation code of each ordinary or special character argument. - * A new request, `phw`, reports to the standard error stream the list of hyphenation exceptions associated with the current hyphenation language. diff --git a/doc/groff.texi.in b/doc/groff.texi.in index 38c594d93..07e38da05 100644 --- a/doc/groff.texi.in +++ b/doc/groff.texi.in @@ -9084,8 +9084,8 @@ with a hyphenation code value of zero to it. For example, @samp{.hcode � $} removes the hyphenation code from @samp{�} (unless @samp{$} has already been assigned a different one). -The @code{phcode} request may be helpful to troubleshoot hyphenation -code assignments. @xref{Debugging}. +The experimental @code{pchar} request may be helpful to troubleshoot +hyphenation code assignments. @xref{Debugging}. @endDefreq @Defreq {hpfcode, a b [c d] @dots{}} @@ -17458,6 +17458,13 @@ If you know in advance that there are many errors and no useful output, or are interested @emph{only} in diagnostic output, you can suppress GNU @code{troff}'s formatted output with its @option{-z} option. +@Defreq {pchar, c @r{@dots{}}} +Report, +to the standard error stream, +information about each ordinary or special +character@tie{}@var{c}. +@endDefreq + @Defreq {pcolor, [@Var{col} @r{@dots{}}]} @cindex dumping defined colors (@code{pcolor}) @cindex defined colors, dumping (@code{pcolor}) @@ -17486,12 +17493,6 @@ Report the state of the current environment followed by that of all other environments to the standard error stream. @endDefreq -@Defreq {phcode, c @r{@dots{}}} -Report, to the standard error stream, the hyphenation code of each -ordinary or special character@tie{}@var{c}. Special characters are -listed in bracketed syntax using the default escape character. -@endDefreq - @Defreq {phw, } @cindex dumping hyphenation exceptions (@code{phw}) @cindex hyphenation exceptions, dumping (@code{phw}) diff --git a/man/groff.7.man b/man/groff.7.man index 76f2f356a..2ac7e67ca 100644 --- a/man/groff.7.man +++ b/man/groff.7.man @@ -4035,6 +4035,13 @@ Change the page number character used in titles .RI to\~ c . . .TPx +.REQ .pchar "c \fR\&.\|.\|.\&\fP" +Report, +to the standard error stream, +information about each ordinary or special +.RI character\~ c . +. +.TPx .REQ .pcolor Report, to the standard error stream, @@ -4071,13 +4078,6 @@ Report the state of the current environment followed by that of all other environments to the standard error stream. . .TPx -.REQ .phcode "c \fR\&.\|.\|.\&\fP" -Report, -to the standard error stream, -the hyphenation code of each ordinary or special -.RI character\~ c . -. -.TPx .REQ .phw Report, to the standard error stream, @@ -8725,6 +8725,8 @@ defined names\[em]macros, strings, and .RB diversions\[em]( pm ); +characters +.RB ( pchar "; experimental); colors .RB ( pcolor ); composite characters @@ -8732,8 +8734,6 @@ composite characters environments .RB ( pev ); hyphenation codes -.RB ( phcode ); -hyphenation exceptions .RB ( phw ); registers .RB ( pnr ); diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man index dba8367e2..fa9130565 100644 --- a/man/groff_diff.7.man +++ b/man/groff_diff.7.man @@ -3325,6 +3325,15 @@ in the top-level diversion. . . .TP +.BI .pchar\~ c\~\c +\&.\|.\|. +Report, +to the standard error stream, +information about each ordinary or special +.RI character\~ c . +. +. +.TP .BR .pcolor \~[\c .IR col \~\&.\|.\|.] Report, @@ -3360,18 +3369,6 @@ other environments to the standard error stream. . . .TP -.BI .phcode\~ c\~\c -\&.\|.\|. -Report, -to the standard error stream, -the hyphenation code of each ordinary or special -.RI character\~ c . -. -Special characters are listed in bracketed syntax using the default -escape character. -. -. -.TP .B .phw Report, to the standard error stream, @@ -5673,15 +5670,16 @@ and . Examine more aspects of formatter state with requests that write lists of -defined colors +defined +characters +.RB ( pchar "; experimental); +colors .RB ( pcolor ), composite characters .RB ( pcomposite ), environments .RB ( pev ), hyphenation codes -.RB ( phcode ), -hyphenation exceptions .RB ( phw ), registers .RB ( pnr ), diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp index 5c350101f..03fd0c52a 100644 --- a/src/roff/troff/input.cpp +++ b/src/roff/troff/input.cpp @@ -8002,43 +8002,6 @@ static void set_hyphenation_codes() skip_line(); } -static void report_hyphenation_codes() -{ - if (!has_arg()) { - warning(WARN_MISSING, "hyphenation code report request expects" - " arguments"); - skip_line(); - return; - } - while (has_arg()) { - unsigned char ch = tok.ch(); - if (csdigit(ch)) { - error("a numeral cannot have a hyphenation code"); - break; - } - charinfo *ci = tok.get_char(); - if (0 == ch) { - // Is the argument a non-special-character escape sequence? - if (0 /* nullptr */ == ci) { - error("%1 cannot have a hyphenation code", tok.description()); - break; - } - } - unsigned char code = ci->get_hyphenation_code(); - if (ci->get_translation() - && ci->get_translation()->is_translatable_as_input()) - code = ci->get_translation()->get_hyphenation_code(); - if (0 == ch) - errprint("\\[%1]\t%2\n", ci->nm.contents(), int(code)); - else - errprint("%1\t%2\n", ch, int(code)); - tok.next(); - tok.skip(); - } - fflush(stderr); - skip_line(); -} - void hyphenation_patterns_file_code() { error("hyphenation pattern file code assignment request will be" @@ -9441,7 +9404,6 @@ void init_input_requests() init_request("pchar", report_character_request); init_request("pcolor", report_color); init_request("pcomposite", report_composite_characters); - init_request("phcode", report_hyphenation_codes); init_request("pi", pipe_output); init_request("pm", print_macros); init_request("psbb", ps_bbox_request); diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl index daad73658..5cd300e8c 100644 --- a/src/utils/grog/grog.pl +++ b/src/utils/grog/grog.pl @@ -328,7 +328,7 @@ sub interpret_line { 'mk', 'mso', 'msoquiet', 'na', 'ne', 'nf', 'nh', 'nm', 'nn', 'nop', 'nr', 'nroff', 'ns', 'nx', 'open', 'opena', 'os', 'output', 'pc', 'pcolor', 'pcomposite', - 'pev', 'phcode', 'phw', 'pi', 'pl', 'pline', 'pm', + 'pev', 'phw', 'pi', 'pl', 'pline', 'pm', 'pn', 'pnr', 'po', 'ps', 'psbb', 'pso', 'ptr', 'pvs', 'rchar', 'rd', 'return', 'rfschar', 'rj', 'rm', 'rn', 'rnn', 'rr', 'rs', 'rt', 'schar', 'shc', 'shift', _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit