chiark / gitweb /
Update copyright dates to 2000.
[adns.git] / src / parse.c
index 9a4e0c7483498daad8ed12180398cd31fe68dccd..b643e8948815ce6182691b76177c42aba747a676 100644 (file)
@@ -4,10 +4,10 @@
  */
 /*
  *  This file is
- *    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
+ *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
  *
  *  It is part of adns, which is
- *    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
+ *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
  *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
  *  
  *  This program is free software; you can redistribute it and/or modify
@@ -35,13 +35,12 @@ int vbuf__append_quoted1035(vbuf *vb, const byte *buf, int len) {
     qbuf[0]= 0;
     for (i=0; i<len; i++) {
       ch= buf[i];
-      if (ch == '.' || ch == '"' || ch == '(' || ch == ')' ||
-         ch == '@' || ch == ';' || ch == '$' || ch == '\\') {
-       sprintf(qbuf,"\\%c",ch);
-       break;
-      } else if (ch <= ' ' || ch >= 127) {
+      if (ch <= ' ' || ch >= 127) {
        sprintf(qbuf,"\\%03o",ch);
        break;
+      } else if (!ctype_domainunquoted(ch)) {
+       sprintf(qbuf,"\\%c",ch);
+       break;
       }
     }
     if (!adns__vbuf_append(vb,buf,i) || !adns__vbuf_append(vb,qbuf,strlen(qbuf)))