Follow-up Comment #5, bug #64639 (project groff):
[comment #4 comment #4:] > Nevertheless Bjarni seems to have found a footgun. (Perhaps he has a big gun...or big feet.) > > Could we use more input validation in `DRH`? Not necessary, really. I preferred to use mom's COLOR macro in the graphical objects macro, but it's not essential. This patch to DRH should clear up any concerns Bjarni envisages. The same change will be applied to the remaining graphical object macros if it passes muster. --- om.tmac.working.copy.bak02 2023-09-08 21:01:23.606662237 -0400 +++ om.tmac 2023-09-11 13:58:17.269063693 -0400 @@ -1934,7 +1934,6 @@ .ds BLACK \m[black] .ds white \m[white] .ds WHITE \m[white] -.ds default black \# \# ===================================================================== \# @@ -2844,17 +2843,12 @@ . ds $RL_WEIGHT \\$1 . ds $RL_INDENT \\$2 . ds $RL_LENGTH \\$3 -. ie !'\\$4'' .ds $RL_COLOR \\$4 -. el \{\ -. ie '\\n[.m]'' .ds $RL_COLOR \\*[default] -. el .ds $RL_COLOR \\n[.m] -. \} . nr #SAVED_WEIGHT \\n[#RULE_WEIGHT] . nr #SAVED_WEIGHT_ADJ \\n[#RULE_WEIGHT_ADJ] . di NULL . if \\n[#NUM_ARGS]>=1 .RULE_WEIGHT \\*[$RL_WEIGHT] . di -. COLOR \\*[$RL_COLOR] +. if !'\\$4'' .gcolor \\$4 . ie \\n[#NUM_ARGS]=0 \{\ . ie \\n[#INDENT_ACTIVE] \{\ . nr #RESTORE_L_LENGTH \\n[.l] @@ -2899,7 +2893,7 @@ . if \\n[#NOFILL_MODE]=3 .CENTER . if \\n[#NOFILL_MODE]=5 .RIGHT . \} -. gcolor +. gcolor default . nr #RULE_WEIGHT \\n[#SAVED_WEIGHT] . nr #RULE_WEIGHT_ADJ \\n[#SAVED_WEIGHT_ADJ] . rr #SAVED_WEIGHT _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64639> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/