etc/services - sync with NetBSD-8
[minix.git] / external / bsd / bind / dist / doc / misc / format-options.pl
blob16baaadc9c17b60858a6442a7dace3c74c9f3368
1 #!/usr/bin/perl
3 # Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2001 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # Id: format-options.pl,v 1.5 2007/09/24 04:21:59 marka Exp
20 print <<END;
22 This is a summary of the named.conf options supported by
23 this version of BIND 9.
25 END
27 # Break long lines
28 while (<>) {
29 chomp;
30 s/\t/ /g;
31 my $line = $_;
32 m!^( *)!;
33 my $indent = $1;
34 my $comment = "";
35 if ( $line =~ m!//.*! ) {
36 $comment = $&;
37 $line =~ s!//.*!!;
39 my $start = "";
40 while (length($line) >= 79 - length($comment)) {
41 $_ = $line;
42 # this makes sure that the comment has something in front of it
43 $len = 75 - length($comment);
44 m!^(.{0,$len}) (.*)$!;
45 $start = $start.$1."\n";
46 $line = $indent." ".$2;
48 print $start.$line.$comment."\n";