please find below a gtp-commands.sed that doesn't include
embedded newlines.  it uses the sequence "\n", instead.

seems to work fine w/ GNU sed.  how about BSD sed?
if so, i think we can close the issue once it is committed.

thi

________________________________________________________________
# gtp-commands.sed (edit in -*-shell-script-*- mode)
# Author: Thien-Thi Nguyen <[EMAIL PROTECTED]>

# Look for function headers.
/\* Function: /,/^{/!d

# Remove cruft.
/^static int/d
/^{/d
/^ \*\//d
s/(char.*)//g

# Hold comment lines, deleting them from pattern space for now.
/.\*/{
 s/^..//
 s/^ //
 H
 d
}

# When we see the function name, merge hold space, in the process
# generating proper texinfo @cindex, @item and @example formatting.
# As a bonus, the `Function' field is moved to the @item line.
# We use repeated `x' commands instead of the simpler `i' to avoid
# requiring a `d' (which would render this script non-composable).
/^gtp_/{
 s/\(.*\)/@cindex \1 GTP [EMAIL PROTECTED] \1/
 x
 s/^\(.\)Function: *\(.*\)\(Arguments:\)/: [EMAIL PROTECTED]/
 s/\n *\([EMAIL PROTECTED])/ \1/g
 s/$/[EMAIL PROTECTED] example/
 H
 s/.*//
 x
 s/\n//2
}

# gtp-commands.sed ends here


_______________________________________________
gnugo-devel mailing list
gnugo-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/gnugo-devel

Reply via email to