chiark / gitweb /
Line breaking.
authorianmdlvl <ianmdlvl>
Mon, 31 Dec 2001 20:12:38 +0000 (20:12 +0000)
committerianmdlvl <ianmdlvl>
Mon, 31 Dec 2001 20:12:38 +0000 (20:12 +0000)
scripts/named-conf
scripts/named-conf.8

index a6d7df8ca2fbcdbeaa056da584715ff917f33fb1..694ab940adff6fdf84f0fa975127a2dd8d2beec5 100755 (executable)
@@ -117,13 +117,17 @@ sub read_config ($) {
     local ($_);
 
     $fh= new IO::File $if,'r' or cfg_fail("open $if:\n $!");
+    $before= '';
     for (;;) {
        if (!defined($_= <$fh>)) {
            cfg_fail("read config file $if:\n $!") if $fh->error();
            last;
        }
-       $where= "$if:$.";
        s/^\s+//; chomp; s/\s+$//;
+       if (m/\\$/) { $before.= $_; next; }
+       $_= $before.$_;
+       $before= '';
+       $where= "$if:$.";
        next if m/^\#/;
        last if m/^end$/;
        next unless m/\S/;
index d4639f202ef76c35fb79fccec9a29128d10d1ef7..6e80aec7f0772750daaef79f5e83f9067e4989b2 100644 (file)
@@ -110,6 +110,10 @@ option) contains a sequence of directives, one per line.  Blank lines
 are permitted.  Leading and trailing whitespace on each line is
 ignored.  Comments are lines starting with
 .BR # .
+Ending a line with a
+.BR \\
+joins it to the next line, so that long directives can be split across
+several physical lines.
 .SS GENERAL DIRECTIVES
 These directives specify general configuration details.  They should
 appear before directives specifying zones, as each will affect only