The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/scripts/split-man

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #!/usr/bin/perl
    2 #
    3 #      split-man: create man pages from kernel-doc -man output
    4 #
    5 # Author:       Tim Waugh <twaugh@redhat.com>
    6 # Modified by:  Christoph Hellwig <hch@infradead.org>
    7 #
    8 
    9 use strict;
   10 
   11 die "$0: where do I put the results?\n" unless ($#ARGV >= 0);
   12 die "$0: can't create $ARGV[0]: $!\n" unless mkdir $ARGV[0], 0777;
   13 
   14 my $state = 0;
   15 
   16 while (<STDIN>) {
   17         s/&amp;(\w+)/\\fB\1\\fP/g; # fix smgl uglinesses
   18         if (/^\.TH \"[^\"]*\" 9 \"([^\"]*)\"/) {
   19                 close OUT unless ($state++ == 0);
   20                 my $fn = "$ARGV[0]/$1.9";
   21                 if (open OUT, ">$fn") {
   22                         print STDERR "creating $fn\n";
   23                 } else {
   24                         die "can't open $fn: $!\n";
   25                 }
   26 
   27                 print OUT $_;
   28         } elsif ($state != 0) {
   29                 print OUT $_;
   30         }
   31 }
   32 
   33 close OUT;

Cache object: 753a598705d008d920c3c0df0c2ba2f5


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.