diff options
author | wl <wl> | 2006-10-26 19:39:07 +0000 |
---|---|---|
committer | wl <wl> | 2006-10-26 19:39:07 +0000 |
commit | 20499dc80f8da12a02007e70497e498bc74d6ca2 (patch) | |
tree | e89de9206d8b0efee708553d28056ad8669ae087 /tmac/trace.tmac | |
parent | 38897a978945ce1108ffa422cc3260e22d67d712 (diff) | |
download | groff-20499dc80f8da12a02007e70497e498bc74d6ca2.tar.gz |
Add `\%^' escape to handle the parameters to a macro as a string
argument.
* src/roff/troff/input.h (DOUBLE_QUOTE): New special character.
* src/roff/troff/input.cpp (input_iterator, input_stack,
macro_iterator): Add `space_follows_arg' member function.
(macro_iterator::add_arg): Add parameter to set the `space_follows'
flag.
(arg_list): Add member `space_follows'.
Update constructor and all callers.
(decode_args): Store discarded double quotes.
(interpolate_args): Handle DOUBLE_QUOTE.
Add `\%^' escape.
(get_copy, token::next, composite_glyph_name): Handle DOUBLE_QUOTE.
* tmac/trace.tmac: Trace .nr, .ds, .ds1, .as, .as1.
* docs/groff.texinfo (Parameters), man/groff.man,
man/groff_diff.man, NEWS: Document it.
Diffstat (limited to 'tmac/trace.tmac')
-rw-r--r-- | tmac/trace.tmac | 89 |
1 files changed, 60 insertions, 29 deletions
diff --git a/tmac/trace.tmac b/tmac/trace.tmac index 6ab3fdc3..0c8d7410 100644 --- a/tmac/trace.tmac +++ b/tmac/trace.tmac @@ -9,30 +9,61 @@ . .eo . +.rn nr !!nr +. +.de nr +. do tm1 "\*[!!!sp]*** .nr \$* +. !!nr \$* +.. +. +.rn ds !!ds +.rn ds1 !!ds1 +.rn as !!as +.rn as1 !!as1 +. +.de ds +. do tm1 "\*[!!!sp]*** .ds \$^ +. do !!ds \$^\" +.. +. +.de ds1 +. do tm1 "\*[!!!sp]*** .ds1 \$^ +. do !!ds1 \$^\" +.. +. +.de as +. do tm1 "\*[!!!sp]*** .as \$^ +. do !!as \$^\" +.. +. +.de as1 +. do tm1 "\*[!!!sp]*** .as1 \$^ +. do !!as1 \$^\" +.. +. .rn de !!de .rn de1 !!de1 . -. .!!de de . do ecs . ec . do !!de \$1 -. do ie \\n[.br] .ds !!!br .\" -. el .do ds !!!br '\" +. do ie \\n[.br] .!!ds !!!br .\" +. el .do !!ds !!!br '\" . ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** de trace enter: \\*[!!!br]\\$0 \\$@ . el .do tm1 "\\*[!!!sp]*** de trace enter \$1: \\*[!!!br]\\$0 \\$@ -. do as !!!sp " \" +. do !!as !!!sp " \" . do ie \\n[.br] .do !!\$1 \\$@ . el 'do !!\$1 \\$@ . do substring !!!sp 1 -. do ie \\n[.br] .ds !!!br .\" -. el .do ds !!!br '\" +. do ie \\n[.br] .!!ds !!!br .\" +. el .do !!ds !!!br '\" . ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** trace exit: \\*[!!!br]\\$0 \\$@ . el .do tm1 "\\*[!!!sp]*** trace exit \$1: \\*[!!!br]\\$0 \\$@ \.. . -. do ds !!d1 !!\$1 -. do ds !!d2 \$2 +. do !!ds !!d1 !!\$1 +. do !!ds !!d2 \$2 . . do ecr . do dei !!d1 !!d2 @@ -42,22 +73,22 @@ . do ecs . ec . do !!de \$1 -. do ie \\n[.br] .ds !!!br .\" -. el .do ds !!!br '\" +. do ie \\n[.br] .!!ds !!!br .\" +. el .do !!ds !!!br '\" . ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** de1 trace enter: \\*[!!!br]\\$0 \\$@ . el .do tm1 "\\*[!!!sp]*** de1 trace enter \$1: \\*[!!!br]\\$0 \\$@ -. do as !!!sp " \" +. do !!as !!!sp " \" . do ie \\n[.br] .do !!\$1 \\$@ . el 'do !!\$1 \\$@ . do substring !!!sp 1 -. do ie \\n[.br] .ds !!!br .\" -. el .do ds !!!br '\" +. do ie \\n[.br] .!!ds !!!br .\" +. el .do !!ds !!!br '\" . ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** trace exit: \\*[!!!br]\\$0 \\$@ . el .do tm1 "\\*[!!!sp]*** trace exit \$1: \\*[!!!br]\\$0 \\$@ \.. . -. do ds !!d1 !!\$1 -. do ds !!d2 \$2 +. do !!ds !!d1 !!\$1 +. do !!ds !!d2 \$2 . . do ecr . do dei1 !!d1 !!d2 @@ -70,22 +101,22 @@ . do ecs . ec . do !!de \$1 -. do ie \\n[.br] .ds !!!br .\" -. el .do ds !!!br '\" +. do ie \\n[.br] .!!ds !!!br .\" +. el .do !!ds !!!br '\" . ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** am trace enter: \\*[!!!br]\\$0 \\$@ . el .do tm1 "\\*[!!!sp]*** am trace enter \$1: \\*[!!!br]\\$0 \\$@ -. do as !!!sp " \" +. do !!as !!!sp " \" . do ie \\n[.br] .do !!\$1 \\$@ . el 'do !!\$1 \\$@ . do substring !!!sp 1 -. do ie \\n[.br] .ds !!!br .\" -. el .do ds !!!br '\" +. do ie \\n[.br] .!!ds !!!br .\" +. el .do !!ds !!!br '\" . ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** trace exit: \\*[!!!br]\\$0 \\$@ . el .do tm1 "\\*[!!!sp]*** trace exit \$1: \\*[!!!br]\\$0 \\$@ \.. . -. do ds !!a1 !!\$1 -. do ds !!a2 \$2 +. do !!ds !!a1 !!\$1 +. do !!ds !!a2 \$2 . . do ecr . do ami !!a1 !!a2 @@ -95,22 +126,22 @@ . do ecs . ec . do !!de \$1 -. do ie \\n[.br] .ds !!!br .\" -. el .do ds !!!br '\" +. do ie \\n[.br] .!!ds !!!br .\" +. el .do !!ds !!!br '\" . ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** am1 trace enter: \\*[!!!br]\\$0 \\$@ . el .do tm1 "\\*[!!!sp]*** am1 trace enter \$1: \\*[!!!br]\\$0 \\$@ -. do as !!!sp " \" +. do !!as !!!sp " \" . do ie \\n[.br] .do !!\$1 \\$@ . el 'do !!\$1 \\$@ . do substring !!!sp 1 -. do ie \\n[.br] .ds !!!br .\" -. el .do ds !!!br '\" +. do ie \\n[.br] .!!ds !!!br .\" +. el .do !!ds !!!br '\" . ie "\$1"\\$0" .do tm1 "\\*[!!!sp]*** trace exit: \\*[!!!br]\\$0 \\$@ . el .do tm1 "\\*[!!!sp]*** trace exit \$1: \\*[!!!br]\\$0 \\$@ \.. . -. do ds !!a1 !!\$1 -. do ds !!a2 \$2 +. do !!ds !!a1 !!\$1 +. do !!ds !!a2 \$2 . . do ecr . do ami1 !!a1 !!a2 |