From 0eef02b8f3508e600baaf74a4bfe28ecc0c49b66 Mon Sep 17 00:00:00 2001 From: Russ Rowan Date: Sun, 8 Jan 2006 17:42:04 -0500 Subject: [PATCH] Handle: SGML_PARSER_CODE_OK = 1, /**: The parsing was successful */ --- doc/tools/code2doc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/tools/code2doc b/doc/tools/code2doc index 793df00a..59d4ed09 100755 --- a/doc/tools/code2doc +++ b/doc/tools/code2doc @@ -20,12 +20,12 @@ while () if ($_ =~ /^\s+\*\s$/) { next if $first; $_ =~ s/\s\*// if not $first; } if ($_ =~ /^\s\*+\/$/ or $_ !~ /^\s/) { $found = undef; next; } $_ =~ s/^(\s*)\s\*\s/$1/; - $found = 'sorta' if $_ =~ s/\s*\*\/$//; $first = undef; + $found = 'sorta' if $_ =~ s/\s*\*\/$/\n/; $first = undef; } elsif ($_ =~ /^\s*\/\*\*\s(.*)/) { $_ = $1; $first = 1; - print FILEOUT "\n\n\n" if $start; + print FILEOUT "\n\n" if $start; if ($_ =~ s/\s*\*\/$//) { $found = 'sorta'; } else { $found = $.; } if ($_ =~ /::/) { $_ = "$_\n\n"; } else @@ -34,13 +34,13 @@ while () $_ = "$_\n$dash\n\n"; } } - elsif ($_ =~ /\s*([A-Z0-9_]+),\s*\/\*::\s*(.*)\s+\*\/$/) + elsif ($_ =~ /\s*([A-Z0-9_]+)(\s+=\s+[0-9]+)?,\s*\/\*::\s*(.*)\s+\*\/$/) { print FILEOUT "\n" if $gotone; - $_ =~ s/\s*([A-Z0-9_]+),\s*\/\*::\s*(.*)\s+\*\/$/id[$1]::\n $2/; + $_ =~ s/\s*([A-Z0-9_]+)(\s+=\s+[0-9]+|),\s*\/\*::\s*(.*)\s+\*\/$/id[$1]::\n $3/; $found = 'sorta'; $gotone = $.; } - $gotone = undef if $gotone and $gotone < $.; + print FILEOUT "\n" and $gotone = undef if $gotone and $gotone < $.; next if not $found; $found = undef if $found eq 'sorta'; print FILEOUT $_ and $start = 1; }