OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sort static functions in topological order.
[pf3gnuchains/gcc-fork.git]
/
contrib
/
texi2pod.pl
diff --git
a/contrib/texi2pod.pl
b/contrib/texi2pod.pl
index
2791cdd
..
fcdc145
100755
(executable)
--- a/
contrib/texi2pod.pl
+++ b/
contrib/texi2pod.pl
@@
-6,7
+6,7
@@
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version
2
, or (at your option)
+# the Free Software Foundation; either version
3
, or (at your option)
# any later version.
# GCC is distributed in the hope that it will be useful,
# any later version.
# GCC is distributed in the hope that it will be useful,
@@
-218,9
+218,11
@@
while(<$inf>) {
s/\@\}/}/g;
s/\@\@/&at;/g;
s/\@\}/}/g;
s/\@\@/&at;/g;
- # Inside a verbatim block, handle @var specially.
+ # Inside a verbatim block, handle @var
, @samp and @url
specially.
if ($shift ne "") {
s/\@var\{([^\}]*)\}/<$1>/g;
if ($shift ne "") {
s/\@var\{([^\}]*)\}/<$1>/g;
+ s/\@samp\{([^\}]*)\}/"$1"/g;
+ s/\@url\{([^\}]*)\}/<$1>/g;
}
# POD doesn't interpret E<> inside a verbatim block.
}
# POD doesn't interpret E<> inside a verbatim block.
@@
-250,10
+252,12
@@
while(<$inf>) {
next;
};
next;
};
- /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
+ /^\@(?:section|unnumbered|unnumberedsec|center
|heading
)\s+(.+)$/
and $_ = "\n=head2 $1\n";
/^\@subsection\s+(.+)$/
and $_ = "\n=head3 $1\n";
and $_ = "\n=head2 $1\n";
/^\@subsection\s+(.+)$/
and $_ = "\n=head3 $1\n";
+ /^\@subsubsection\s+(.+)$/
+ and $_ = "\n=head4 $1\n";
# Block command handlers:
/^\@itemize(?:\s+(\@[a-z]+|\*|-))?/ and do {
# Block command handlers:
/^\@itemize(?:\s+(\@[a-z]+|\*|-))?/ and do {
@@
-262,7
+266,7
@@
while(<$inf>) {
if (defined $1) {
$ic = $1;
} else {
if (defined $1) {
$ic = $1;
} else {
- $ic = '
@bullet
';
+ $ic = '
*
';
}
$_ = "\n=over 4\n";
$endw = "itemize";
}
$_ = "\n=over 4\n";
$endw = "itemize";
@@
-295,6
+299,7
@@
while(<$inf>) {
$ic =~ s/\@(?:code|kbd)/C/;
$ic =~ s/\@(?:dfn|var|emph|cite|i)/I/;
$ic =~ s/\@(?:file)/F/;
$ic =~ s/\@(?:code|kbd)/C/;
$ic =~ s/\@(?:dfn|var|emph|cite|i)/I/;
$ic =~ s/\@(?:file)/F/;
+ $ic =~ s/\@(?:asis)//;
$_ = "\n=over 4\n";
};
$_ = "\n=over 4\n";
};
@@
-317,8
+322,18
@@
while(<$inf>) {
/^\@itemx?\s*(.+)?$/ and do {
if (defined $1) {
/^\@itemx?\s*(.+)?$/ and do {
if (defined $1) {
- # Entity escapes prevent munging by the <> processing below.
- $_ = "\n=item $ic\<$1\>\n";
+ if ($ic) {
+ if ($endw eq "enumerate") {
+ $_ = "\n=item $ic $1\n";
+ $ic =~ s/(\d+)/$1 + 1/eg;
+ } else {
+ # Entity escapes prevent munging by the <>
+ # processing below.
+ $_ = "\n=item $ic\<$1\>\n";
+ }
+ } else {
+ $_ = "\n=item $1\n";
+ }
} else {
$_ = "\n=item $ic\n";
$ic =~ y/A-Ya-y/B-Zb-z/;
} else {
$_ = "\n=item $ic\n";
$ic =~ y/A-Ya-y/B-Zb-z/;
@@
-374,7
+389,7
@@
sub postprocess
s/\@r\{([^\}]*)\}/R<$1>/g;
s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g;
s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g;
s/\@r\{([^\}]*)\}/R<$1>/g;
s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g;
s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g;
- s/\@(?:
gccoptlist|
samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g;
+ s/\@(?:samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g;
s/\@sc\{([^\}]*)\}/\U$1/g;
s/\@file\{([^\}]*)\}/F<$1>/g;
s/\@w\{([^\}]*)\}/S<$1>/g;
s/\@sc\{([^\}]*)\}/\U$1/g;
s/\@file\{([^\}]*)\}/F<$1>/g;
s/\@w\{([^\}]*)\}/S<$1>/g;
@@
-400,6
+415,9
@@
sub postprocess
s/\@gol//g;
s/\@\*\s*\n?//g;
s/\@gol//g;
s/\@\*\s*\n?//g;
+ # Anchors are thrown away
+ s/\@anchor\{(?:[^\}]*)\}//g;
+
# @uref can take one, two, or three arguments, with different
# semantics each time. @url and @email are just like @uref with
# one argument, for our purposes.
# @uref can take one, two, or three arguments, with different
# semantics each time. @url and @email are just like @uref with
# one argument, for our purposes.
@@
-407,6
+425,10
@@
sub postprocess
s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g;
s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g;
s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g;
s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g;
+ # Handle gccoptlist here, so it can contain the above formatting
+ # commands.
+ s/\@gccoptlist\{([^\}]*)\}/B<$1>/g;
+
# Un-escape <> at this point.
s/</</g;
s/>/>/g;
# Un-escape <> at this point.
s/</</g;
s/>/>/g;