def process_line(line, do_prefix_hack = false)
return nil if (line[0,1] == ";")
return nil if (line.strip.length == 0)
return nil if (!line || (line.length == 0))
@in_quoted_section = false if !@continued_line
line = strip_comments(line)
if (line.index("$ORIGIN") == 0)
@origin = line.split()[1].strip
return nil
end
if (line.index("$TTL") == 0)
@last_explicit_ttl = get_ttl(line.split()[1].strip)
return nil
end
if (@continued_line)
@continued_line = strip_comments(@continued_line)
line = @continued_line.strip.chomp + " " + line
if (line.index(")"))
@continued_line = false
end
end
open_bracket = line.index("(")
if (open_bracket)
index = line.index(")")
if (index && (index > open_bracket))
@continued_line = false
else
@continued_line = line
end
end
return nil if @continued_line
line = strip_comments(line) + "\n"
return normalise_line(line, do_prefix_hack)
end