Annotation of embedaddon/sudo/doc/sudoers.man.pl, revision 1.1.1.1

1.1       misho       1: #!/usr/bin/perl -p
                      2: 
                      3: BEGIN {
                      4:     $cond = -1;
                      5: }
                      6: 
                      7: # Initialize the numeric register we use for conditionals
                      8: if ($cond == -1) {
                      9:     $_ = ".nr SL \@SEMAN\@\n.nr BA \@BAMAN\@\n.nr LC \@LCMAN\@\n.\\\"\n$_";
                     10:     $cond = 0;
                     11: }
                     12: 
                     13: # Make SELinux_Spec conditional
                     14: if (/(.*)SELinux_Spec\? (.*)$/) {
                     15:     $_ = ".ie \\n(SL $_.el $1$2\n";
                     16: } elsif (/^(.*SELinux_Spec ::=)/) {
                     17:     $_ = ".if \\n(SL \\{\\\n$_";
                     18: } elsif (/^(.*Tag_Spec ::=)/) {
                     19:     $_ = "\\}\n$_";
                     20: }
                     21: 
                     22: if (/^\.S[Sh] "SELinux_Spec"/) {
                     23:     $_ = ".if \\n(SL \\{\\\n$_";
                     24:     $cond = 1;
                     25: } elsif (/^\.IP "(role|type)"/) {
                     26:     $_ = ".if \\n(SL \\{\\\n$_";
                     27:     $cond = 1;
                     28: } elsif (/^\.IP "use_loginclass"/) {
                     29:     $_ = ".if \\n(LC \\{\\\n$_";
                     30:     $cond = 1;
                     31: } elsif ($cond && /^\.(Sh|SS|IP|PP)/) {
                     32:     $_ = "\\}\n$_";
                     33:     $cond = 0;
                     34: }
                     35: 
                     36: # Fix up broken pod2man formatting of F<@foo@/bar>
                     37: s/\\fI\\f(\(C)?I\@([^\@]*)\\fI\@/\\fI\@$2\@/g;
                     38: s/\\f\(\CW\@([^\@]*)\\fR\@/\@$1\@/g;
                     39: #\f(CW@secure_path\fR@

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>