nsd+CRLF = confusing error messages

Arnt Gulbrandsen arnt at gulbrandsen.priv.no
Tue Mar 28 17:09:54 UTC 2006


Miek Gieben writes:
> I have no access to windows (at least no to one where I can develop 
> and compile), but this change should be as easy as changing the 
> following:
>
> zlexer.lex, line 75:
> NEWLINE \n
>
> into:
> NEWLINE \n|\r
>
> does that work for you?

Luckily, I don't have access to Windows box either ;) But I could test.

That's not quite sufficient. But I looked at the nearby lines, and found 
that this patch is enough:

--- nsd-2.3.3-orig/zlexer.lex   2005-05-12 14:55:38.000000000 +0200
+++ nsd-2.3.3/zlexer.lex        2006-03-28 19:07:27.585419750 +0200
@@ -72,8 +72,8 @@

  SPACE   [ \t]
  LETTER  [a-zA-Z]
-NEWLINE \n
-ZONESTR [^ \t\n();.\"\$]
+NEWLINE [\n\r]
+ZONESTR [^ \t\r\n();.\"\$]
  DOLLAR  \$
  COMMENT ;
  DOT     \.

Still a lot simpler than rejecting with a good error message ;) Thank 
you for your speedy response.

Arnt



More information about the nsd-users mailing list