I admit this may be a bit rash with only 20 years of warning. If anyone's wondering, the 'Df' drawing command is not documented in CSTR #54.
Also see <https://savannah.gnu.org/bugs/?64353>. This if for groff 1.24--but to give more notice, if there is to be a groff 1.23.1, I propose cherry-picking it onto a 1.23-stable branch or similar. Diff attached. Comments welcome. troff ----- o GNU troff now issues an error diagnostic when the 'f' drawing command is used (in a `\D'f 500'` escape sequence, for example). This drawing command was declared obsolete in this NEWS file 20 years ago as part of the groff 1.19 release. Users of this escape sequence will want to migrate to the `Fg` drawing command or use higher level language features, like the `defcolor` and `fcolor` requests, and the `\M` escape sequence, for setting a grayscale fill color for geometric objects. Support for 'f' may disappear in the next release. Output drivers -------------- o Output drivers now issue a warning diagnostic when the 'f' drawing command is used (`Df 500 0`, for example). This drawing command was declared obsolete in this NEWS file 20 years ago as part of the groff 1.19 release. Users of this escape sequence will want to migrate to the `Fg` drawing command to set a grayscale fill color for geometric objects. Support for 'f' may disappear in the next release, producing an error diagnostic regarding an unrecognized command. Regards, Branden
diff --git a/NEWS b/NEWS index 1d6cf3c2f..4c992b513 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,15 @@ VERSION next troff ----- +o GNU troff now issues an error diagnostic when the 'f' drawing command + is used (in a `\D'f 500'` escape sequence, for example). This drawing + command was declared obsolete in this NEWS file 20 years ago as part + of the groff 1.19 release. Users of this escape sequence will want to + migrate to the `Fg` drawing command or use higher level language + features, like the `defcolor` and `fcolor` requests, and the `\M` + escape sequence, for setting a grayscale fill color for geometric + objects. Support for 'f' may disappear in the next release. + o GNU troff output now reports unbreakable spaces (those produced with the `\~` escape sequence) as word breaks with the documentary 'w' command, just as regular breakable spaces do. @@ -58,6 +67,17 @@ o The s (ms) macro package now sets the vertical spacing register document with a type size of 20 points, the vertical spacing now defaults to 24 points rather than 22. +Output drivers +-------------- + +o Output drivers now issue a warning diagnostic when the 'f' drawing + command is used (`Df 500 0`, for example). This drawing + command was declared obsolete in this NEWS file 20 years ago as part + of the groff 1.19 release. Users of this escape sequence will want to + migrate to the `Fg` drawing command to set a grayscale fill color for + geometric objects. Support for 'f' may disappear in the next release, + producing an error diagnostic regarding an unrecognized command. + VERSION 1.23.0 ============== diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl index e86644da5..2067f0a19 100644 --- a/src/devices/gropdf/gropdf.pl +++ b/src/devices/gropdf/gropdf.pl @@ -3140,6 +3140,7 @@ sub do_D } elsif ($Dcmd eq 'f') { + Warn("'f' drawing command is obsolete; use 'Fg' instead"); my $mcmd=substr($par,0,1); $par=substr($par,1); diff --git a/src/libs/libdriver/input.cpp b/src/libs/libdriver/input.cpp index 821b526bd..78f73379a 100644 --- a/src/libs/libdriver/input.cpp +++ b/src/libs/libdriver/input.cpp @@ -1361,6 +1361,7 @@ parse_D_command() } case 'f': // Df: set fill gray; obsoleted by DFg { + warning("'f' drawing command is obsolete; use 'Fg' instead"); IntArg arg = get_integer_arg(); if ((arg >= 0) && (arg <= 1000)) { // convert arg and treat it like DFg diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp index e797e2200..cc0b59f38 100644 --- a/src/roff/troff/input.cpp +++ b/src/roff/troff/input.cpp @@ -8754,6 +8754,9 @@ static node *read_draw_node() error("even number of arguments needed for spline"); break; case 'f': + error("'f' drawing command is obsolete;" + " use 'Fg' drawing command, 'M' escape sequence," + " or 'fcolor' request instead"); if (npoints != 1 || !no_last_v) { error("one argument needed for gray shade"); npoints = 1;
signature.asc
Description: PGP signature