~ubuntu-branches/ubuntu/raring/maradns/raring

« back to all changes in this revision

Viewing changes to update/1.3.02/maradns-1.3.01-tilde.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2010-01-24 12:17:40 UTC
  • mfrom: (1.1.13 upstream) (10.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100124121740-a4e1fjobwaouz443
Tags: 1.4.02-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
*** maradns-1.3.01/parse/Csv2_parse.c   2006-12-21 00:34:46.000000000 -0800
2
 
--- maradns-1.3.02/parse/Csv2_parse.c   2006-12-23 07:37:27.000000000 -0800
3
 
***************
4
 
*** 323,335 ****
5
 
  
6
 
  /* process_comment: Process a comment that we find in the input stream */
7
 
  void process_comment(csv2_read *stream) {
8
 
!       int in, q;
9
 
          q = 1;
10
 
11
 
        do {
12
 
                in = csv2_readchar(stream);
13
 
!               /* Only the first tilde is considered a tilde */
14
 
!               if(in == '~' && q != 1) {
15
 
                        (stream->tilde_seen)--;
16
 
                }
17
 
                  q++;
18
 
--- 323,337 ----
19
 
  
20
 
  /* process_comment: Process a comment that we find in the input stream */
21
 
  void process_comment(csv2_read *stream) {
22
 
!       int in, q, z;
23
 
          q = 1;
24
 
!         
25
 
!         z = stream->chars_allowed;
26
 
!         csv2_allow_tilde(stream);
27
 
        do {
28
 
                in = csv2_readchar(stream);
29
 
!               /* Tildes are allowed (and ignored) in comments */
30
 
!               if(in == '~') {
31
 
                        (stream->tilde_seen)--;
32
 
                }
33
 
                  q++;
34
 
***************
35
 
*** 338,343 ****
36
 
--- 340,346 ----
37
 
                        return;
38
 
                  }
39
 
        } while(in != '\n' && in != '\r' && in != -2 /* EOF */);
40
 
+               stream->chars_allowed = z; 
41
 
  }
42
 
  
43
 
  /* Handler for processing things before the beginning of a RR; this
44
 
***************
45
 
*** 478,495 ****
46
 
                }
47
 
                /* # for comments */
48
 
                if(in == '#') {
49
 
-                       int ttt;
50
 
-                       ttt = 0;        
51
 
-                       if(options == 1 && 
52
 
-                             (stream->tilde_handling == 2 ||
53
 
-                              stream->tilde_handling == 3)) {
54
 
-                               ttt = 1;        
55
 
-                               csv2_allow_tilde(stream);
56
 
-                       }
57
 
                        process_comment(stream);
58
 
-                       if(ttt == 1) {
59
 
-                               csv2_forbid_tilde(stream);
60
 
-                       }
61
 
                        in = '\n';
62
 
                }
63
 
                else if(options != 1 && is_ok(in)) {
64
 
--- 481,487 ----
65
 
*** maradns-1.3.01/doc/en/source/csv2.ej        2006-12-21 00:34:46.000000000 -0800
66
 
--- maradns-1.3.02/doc/en/source/csv2.ej        2006-12-23 07:38:57.000000000 -0800
67
 
***************
68
 
*** 53,68 ****
69
 
  
70
 
  The zone file supports comments; comments are specified by having a '#' 
71
 
  anywhere between fields or records; when a '#' is seen, the csv2 parser 
72
 
! ignores any character it sees (with the exception of the '{' and '~' 
73
 
! characters) until a newline.  A '#' can usually be placed inside a field, 
74
 
! and indicates the end of a field when placed there.
75
 
  <p>
76
 
  
77
 
! A '{' character can never be placed in a comment.  I '~' character normally
78
 
! can not be placed in a comment; the only time it can be placed in a comment
79
 
! is between resource records.  If the '~' character is placed immediately
80
 
! after the initial '#' character, the '~' is used as a resource record
81
 
! delimiter.  Otherwise, the '~' character has no meta-significance.
82
 
  
83
 
  <p>
84
 
  
85
 
--- 53,65 ----
86
 
  
87
 
  The zone file supports comments; comments are specified by having a '#' 
88
 
  anywhere between fields or records; when a '#' is seen, the csv2 parser 
89
 
! ignores any character it sees (with the exception of the '{', which
90
 
! is not allowed in comments) until a newline.  A '#' can usually be 
91
 
! placed inside a field, and indicates the end of a field when placed there.
92
 
  <p>
93
 
  
94
 
! A '{' character can never be placed in a comment.  A '~' character is always
95
 
! allowed in a comment, and has no special meaning when placed in a comment.
96
 
  
97
 
  <p>
98