reassign 472903 scons
thanks

On Sat, Mar 29, 2008 at 11:48:31AM -0700, Ian Zimmerman wrote:
> It seems groff just can't understand the .RE macro.  Removing it (and the
> corresponding .RB) from the definitions at the start of the source leads
> to a normal readable page (albeit without examples being indented).
> 
> Moreover, trying to replace the pair with .IP "" 8 and .PP doesn't work
> either - the indent stays throughout.  groff seems seriously borked in
> this area.

The manual page in question has this in its preamble (before .TH):

  .\" ES - Example Start - indents and turns off line fill
  .de ES
  .RS
  .nf
  ..
  .\" EE - Example End - ends indent and turns line fill back on
  .de EE
  .fi
  .RE
  ..

Recently, I backported a set of changes from groff CVS at the request of
some folks who wanted to be able to depend on them, adding Eric's
an-ext.tmac. Among other things, this defines this pair of macros:

  .\" Start example.
  .de EX
  .  nr mE \\n(.f
  .  nf
  .  nh
  .  ft CW
  ..
  .
  .
  .\" End example.
  .de EE
  .  ft \\n(mE
  .  fi
  .  hy \\n(HY
  ..

.de does nothing if the macro you're trying to define already exists, so
this broke your manual page. Sorry about that. There are two
straightforward ways to avoid this.

One is to simply rename your macro to something else. I'm not sure if
there's a recommended way to avoid this problem in future, though, and I
recognise that that's a problem; I'm CCing the groff list in case they
have any suggestions.

The other is to move your preamble below .TH (so that it comes after the
point where an-ext.tmac is sourced), and to remove the existing macros
before defining your own. The attached patch does this.

By the way, there are some other errors in your manual page, visible
with 'man --warnings=w'. I've attached another patch that repairs these.

Cheers,

-- 
Colin Watson                                       [EMAIL PROTECTED]
--- scons.1.orig	2008-04-01 13:19:12.000000000 +0100
+++ scons.1	2008-04-01 13:20:47.000000000 +0100
@@ -21,17 +21,19 @@
 .\"
 .\" doc/man/scons.1 2678 2008/03/03 20:13:17 broonie
 .\"
+.TH SCONS 1 "January 2007"
 .\" ES - Example Start - indents and turns off line fill
+.rm ES
 .de ES
 .RS
 .nf
 ..
 .\" EE - Example End - ends indent and turns line fill back on
+.rm EE
 .de EE
 .fi
 .RE
 ..
-.TH SCONS 1 "January 2007"
 .SH NAME
 scons \- a software construction tool
 .SH SYNOPSIS
--- scons.1.orig	2008-04-01 13:20:47.000000000 +0100
+++ scons.1	2008-04-01 13:30:12.000000000 +0100
@@ -673,7 +673,7 @@
 $ scons --debug=presub
 Building myprog.o with action(s):
   $SHCC $SHCFLAGS $SHCCFLAGS $CPPFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
-...
+\&...
 .EE
 
 .TP
@@ -4403,7 +4403,7 @@
 .IP
 will print:
 .ES
-'$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES'
+\&'$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES'
 .EE
 
 .ES
@@ -4414,7 +4414,7 @@
 will print:
 .ES
 { 'AR': 'ar',
-  'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES\n$RANLIB $RANLIBFLAGS $TARGET',
+  'ARCOM': '$AR $ARFLAGS $TARGET $SOURCES\en$RANLIB $RANLIBFLAGS $TARGET',
   'ARFLAGS': ['r'],
   'AS': 'as',
   'ASCOM': '$AS $ASFLAGS -o $TARGET $SOURCES',
@@ -9535,14 +9535,14 @@
 used if this variable is not set or is None, is:
 .ES
 def print_cmd_line(s, target, source, env):
-  sys.stdout.write(s + "\\n")
+  sys.stdout.write(s + "\en")
 .EE
 .IP
 Here's an example of a more interesting function:
 
 .ES
 def print_cmd_line(s, target, source, env):
-   sys.stdout.write("Building %s -> %s...\\n" %
+   sys.stdout.write("Building %s -> %s...\en" %
     (' and '.join([str(x) for x in source]),
      ' and '.join([str(x) for x in target])))
 env=Environment(PRINT_CMD_LINE_FUNC=print_cmd_line)
@@ -11736,7 +11736,7 @@
 
 .ES
 def my_format(env, opt, help, default, actual):
-    fmt = "\n%s: default=%s actual=%s (%s)\n"
+    fmt = "\en%s: default=%s actual=%s (%s)\en"
     return fmt % (opt, default. actual, help)
 opts.FormatOptionHelpText = my_format
 .EE
@@ -13337,7 +13337,7 @@
 interpreted as a single command line argument.
 
 .IP Newline
-Newline characters (\\n) delimit lines. The newline parsing is done after
+Newline characters (\en) delimit lines. The newline parsing is done after
 all other parsing, so it is not possible for arguments (e.g. file names) to
 contain embedded newline characters. This limitation will likely go away in
 a future version of SCons.
@@ -13995,7 +13995,7 @@
 allows SCons to append the appropriate library
 prefix and suffix for the current platform
 (for example, 'liba.a' on POSIX systems,
-'a.lib' on Windows).
+\&'a.lib' on Windows).
 
 .SS Customizing construction variables from the command line.
 

Reply via email to