ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/doc/pod2texi
(Generate patch)

Comparing gvpe/doc/pod2texi (file contents):
Revision 1.3 by pcg, Sun Apr 13 16:00:31 2003 UTC vs.
Revision 1.4 by pcg, Wed Jul 7 00:28:20 2004 UTC

1#!/usr/bin/perl -p 1#!/usr/bin/perl
2 2
3use Pod::Tree; 3use Pod::Tree;
4 4
5sub escape_texi($) { 5sub escape_texi($) {
6 local $_ = shift; 6 local $_ = shift;
11 11
12sub example { 12sub example {
13 my $text = $_[0]; 13 my $text = $_[0];
14 print "\n\n\@example\n"; 14 print "\n\n\@example\n";
15 $text =~ s/\n+$//; 15 $text =~ s/\n+$//;
16 $text =~ s/([\@\{\}])/@$1/g; 16 $text =~ s/([\@\{\}])/\@$1/g;
17 print $text; 17 print $text;
18 print "\n\@end example\n\n"; 18 print "\n\@end example\n\n";
19} 19}
20 20
21while (<>) { 21while (<>) {
68 # S would mean to use nbsp 68 # S would mean to use nbsp
69 $walker->($_) for @{$n->get_children}; 69 $walker->($_) for @{$n->get_children};
70 } 70 }
71 } elsif ($n->is_command) { 71 } elsif ($n->is_command) {
72 if ($n->is_c_head1) { 72 if ($n->is_c_head1) {
73 print "\n\@subsection "; 73 print "\n\@section ";
74 $walker->($_) for @{$n->get_children}; 74 $walker->($_) for @{$n->get_children};
75 print "\n"; 75 print "\n";
76 } elsif ($n->is_c_head2) { 76 } elsif ($n->is_c_head2) {
77 print "\n\n\@subsubsection "; 77 print "\n\n\@subsection ";
78 $walker->($_) for @{$n->get_children}; 78 $walker->($_) for @{$n->get_children};
79 print "\n"; 79 print "\n";
80 } else { 80 } else {
81 # nop? 81 # nop?
82 } 82 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines