Mercurial > hg > CbC > CbC_gcc
comparison contrib/texi2pod.pl @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 #! /usr/bin/perl -w | 1 #! /usr/bin/perl -w |
2 | 2 |
3 # Copyright (C) 1999, 2000, 2001, 2003, 2010 Free Software Foundation, Inc. | 3 # Copyright (C) 1999-2014 Free Software Foundation, Inc. |
4 | 4 |
5 # This file is part of GCC. | 5 # This file is part of GCC. |
6 | 6 |
7 # GCC is free software; you can redistribute it and/or modify | 7 # GCC is free software; you can redistribute it and/or modify |
8 # it under the terms of the GNU General Public License as published by | 8 # it under the terms of the GNU General Public License as published by |
314 | 314 |
315 /^\@item\s+(.*\S)\s*$/ and $endw eq "multitable" and do { | 315 /^\@item\s+(.*\S)\s*$/ and $endw eq "multitable" and do { |
316 @columns = (); | 316 @columns = (); |
317 for $column (split (/\s*\@tab\s*/, $1)) { | 317 for $column (split (/\s*\@tab\s*/, $1)) { |
318 # @strong{...} is used a @headitem work-alike | 318 # @strong{...} is used a @headitem work-alike |
319 $column =~ s/^\@strong{(.*)}$/$1/; | 319 $column =~ s/^\@strong\{(.*)\}$/$1/; |
320 push @columns, $column; | 320 push @columns, $column; |
321 } | 321 } |
322 $_ = "\n=item ".join (" : ", @columns)."\n"; | 322 $_ = "\n=item ".join (" : ", @columns)."\n"; |
323 }; | 323 }; |
324 | 324 |
335 } | 335 } |
336 } else { | 336 } else { |
337 $_ = "\n=item $1\n"; | 337 $_ = "\n=item $1\n"; |
338 } | 338 } |
339 } else { | 339 } else { |
340 $_ = "\n=item $ic\n"; | 340 $_ = "\n=item Z\<\>$ic\n"; |
341 $ic =~ y/A-Ya-y/B-Zb-z/; | 341 $ic =~ y/A-Ya-y/B-Zb-z/; |
342 $ic =~ s/(\d+)/$1 + 1/eg; | 342 $ic =~ s/(\d+)/$1 + 1/eg; |
343 } | 343 } |
344 }; | 344 }; |
345 | 345 |
387 } | 387 } |
388 | 388 |
389 # Formatting commands. | 389 # Formatting commands. |
390 # Temporary escape for @r. | 390 # Temporary escape for @r. |
391 s/\@r\{([^\}]*)\}/R<$1>/g; | 391 s/\@r\{([^\}]*)\}/R<$1>/g; |
392 s/\@sc\{([^\}]*)\}/\U$1/g; | |
392 s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g; | 393 s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g; |
393 s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g; | 394 s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g; |
394 s/\@(?:samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g; | 395 s/\@(?:samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g; |
395 s/\@sc\{([^\}]*)\}/\U$1/g; | |
396 s/\@acronym\{([^\}]*)\}/\U$1/g; | 396 s/\@acronym\{([^\}]*)\}/\U$1/g; |
397 s/\@file\{([^\}]*)\}/F<$1>/g; | 397 s/\@file\{([^\}]*)\}/F<$1>/g; |
398 s/\@w\{([^\}]*)\}/S<$1>/g; | 398 s/\@w\{([^\}]*)\}/S<$1>/g; |
399 s/\@(?:dmn|math)\{([^\}]*)\}/$1/g; | 399 s/\@(?:dmn|math)\{([^\}]*)\}/$1/g; |
400 s/\@\///g; | 400 s/\@\///g; |
401 s/\@t\{([^\}]*)\}/$1/g; | |
401 | 402 |
402 # keep references of the form @ref{...}, print them bold | 403 # keep references of the form @ref{...}, print them bold |
403 s/\@(?:ref)\{([^\}]*)\}/B<$1>/g; | 404 s/\@(?:ref)\{([^\}]*)\}/B<$1>/g; |
404 | 405 |
405 # Change double single quotes to double quotes. | 406 # Change double single quotes to double quotes. |