Make \\*[xxx]\\ within a macro (with `xxx' a macro too) work as
commitdea765aa97dca23f8849a756d18e4cfcc9d16f03
authorWerner LEMBERG <wl@gnu.org>
Mon, 29 Sep 2008 21:56:05 +0000 (29 21:56 +0000)
committerWerner LEMBERG <wl@gnu.org>
Mon, 29 Sep 2008 21:56:05 +0000 (29 21:56 +0000)
treef0725aff086d0573fd5a95a19befeedf596ec48b
parent9992e9a59516e765e8ef9262b140ae7245ec764c
Make \\*[xxx]\\ within a macro (with `xxx' a macro too) work as
expected.  Without the patch,

  .de aaa
  \\*[bbb]\\
  .  tm \\$*
  ..
  .de bbb
  .  shift
  ..
  .aaa 1 2 3

prints `2 3' instead of `1 2 3'.

* src/roff/troff/input.cpp (input_iterator, input_stack,
macro_iterator): Add `get_arg_list' member function.
(macro): Add `is_a_string', `is_string', and `clear_string_flag'
members.
Update constructors and operators.
(arg_list): Add copy constructor.
(macro_iterator): Add optional argument to constructor to indicate
whether arguments shall be inherited from calling macro.
(interpolate_string): If string argument is a macro, push a macro
iterator on the stack.
(do_define_macro): Call clear_string_flag if macro data contains a
newline.

* src/roff/troff/request.h: Updated.
ChangeLog
src/roff/troff/input.cpp
src/roff/troff/request.h