~ubuntu-branches/ubuntu/jaunty/topal/jaunty

« back to all changes in this revision

Viewing changes to pine-4.44.patch

  • Committer: Bazaar Package Importer
  • Author(s): Phil Brooke
  • Date: 2008-07-18 07:57:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20080718075738-1jbtf92kurbkezdz
Tags: 62-1
* New upstream release.  This includes the necessary upstream work
  to make it work properly again.
* Move from contrib to main (Alpine is in main).
* Fix standards-version to 3.8.0.
* Update gnat dependency and add more architectures.
* Update debian/compat.
* Update description.
* Update copyright file.
* Update depends/recommends/suggests.
* Patches are installed in their own directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Only in pine4.44: .bld.hlp
 
2
Only in pine4.44: bin
 
3
diff -rc OP/pine4.44/imap/src/c-client/mail.h pine4.44/imap/src/c-client/mail.h
 
4
*** OP/pine4.44/imap/src/c-client/mail.h        Tue Nov 13 19:50:10 2001
 
5
--- pine4.44/imap/src/c-client/mail.h   Thu Apr 11 10:21:36 2002
 
6
***************
 
7
*** 621,626 ****
 
8
--- 621,627 ----
 
9
      unsigned long bytes;      /* size of text in octets */
 
10
    } size;
 
11
    char *md5;                  /* MD5 checksum */
 
12
+   unsigned short topal_hack;    /* set to 1 if topal has wrecked the sending */
 
13
  };
 
14
  
 
15
  
 
16
Only in pine4.44/pine: date.c
 
17
diff -rc OP/pine4.44/pine/pine.h pine4.44/pine/pine.h
 
18
*** OP/pine4.44/pine/pine.h     Tue Jan  8 20:55:49 2002
 
19
--- pine4.44/pine/pine.h        Thu Apr 11 10:21:36 2002
 
20
***************
 
21
*** 63,69 ****
 
22
  #ifndef _PINE_INCLUDED
 
23
  #define _PINE_INCLUDED
 
24
  
 
25
! #define PINE_VERSION          "4.44"
 
26
  #define       PHONE_HOME_VERSION      "-count"
 
27
  #define       PHONE_HOME_HOST         "docserver.cac.washington.edu"
 
28
  
 
29
--- 63,69 ----
 
30
  #ifndef _PINE_INCLUDED
 
31
  #define _PINE_INCLUDED
 
32
  
 
33
! #define PINE_VERSION          "4.44T"
 
34
  #define       PHONE_HOME_VERSION      "-count"
 
35
  #define       PHONE_HOME_HOST         "docserver.cac.washington.edu"
 
36
  
 
37
diff -rc OP/pine4.44/pine/send.c pine4.44/pine/send.c
 
38
*** OP/pine4.44/pine/send.c     Tue Jan  8 20:59:37 2002
 
39
--- pine4.44/pine/send.c        Thu Apr 11 11:00:40 2002
 
40
***************
 
41
*** 4695,4700 ****
 
42
--- 4695,4710 ----
 
43
      pbf = save_previous_pbuf;
 
44
      g_rolenick = NULL;
 
45
  
 
46
+     if ((*body)->type == TYPEMULTIPART 
 
47
+       && (*body)->topal_hack == 1)
 
48
+       /* This was a single part message which Topal mangled. */
 
49
+       (*body)->type = TYPETEXT;
 
50
+     if ((*body)->type == TYPEMULTIPART
 
51
+       && (*body)->topal_hack != 1)
 
52
+       /* Topal mangled a multipart message.  So the first nested part
 
53
+        is really TYPETEXT. */
 
54
+       (*body)->nested.part->body.type = TYPETEXT;
 
55
+     
 
56
      dprint(4, (debugfile, "=== send returning ===\n"));
 
57
  }
 
58
  
 
59
***************
 
60
*** 5956,5968 ****
 
61
                                  ;
 
62
  
 
63
                                rfc822_parse_content_header(nb,ucase(buf+8),s);
 
64
!                               if(nb->type == TYPETEXT
 
65
!                                  && nb->subtype
 
66
                                   && (!b->subtype 
 
67
                                       || strucmp(b->subtype, nb->subtype))){
 
68
                                    if(b->subtype)
 
69
                                      fs_give((void **) &b->subtype);
 
70
  
 
71
                                    b->subtype  = nb->subtype;
 
72
                                    nb->subtype = NULL;
 
73
                                      
 
74
--- 5966,5978 ----
 
75
                                  ;
 
76
  
 
77
                                rfc822_parse_content_header(nb,ucase(buf+8),s);
 
78
!                               if(nb->subtype
 
79
                                   && (!b->subtype 
 
80
                                       || strucmp(b->subtype, nb->subtype))){
 
81
                                    if(b->subtype)
 
82
                                      fs_give((void **) &b->subtype);
 
83
  
 
84
+                                   b->type     = nb->type;
 
85
                                    b->subtype  = nb->subtype;
 
86
                                    nb->subtype = NULL;
 
87
                                      
 
88
***************
 
89
*** 5970,5975 ****
 
90
--- 5980,5987 ----
 
91
                                    b->parameter = nb->parameter;
 
92
                                    nb->parameter = NULL;
 
93
                                    mail_free_body_parameter(&nb->parameter);
 
94
+                                   if (b->type != TYPETEXT)
 
95
+                                     b->topal_hack = 1;
 
96
                                }
 
97
  
 
98
                                mail_free_body(&nb);
 
99
***************
 
100
*** 8506,8522 ****
 
101
    dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
 
102
    if (body) switch (body->type) {
 
103
    case TYPEMULTIPART:         /* multi-part */
 
104
!     if (!body->parameter) {   /* cookie not set up yet? */
 
105
!       char tmp[MAILTMPLEN];   /* make cookie not in BASE64 or QUOTEPRINT*/
 
106
!       sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),time (0),
 
107
!              getpid ());
 
108
!       body->parameter = mail_newbody_parameter ();
 
109
!       body->parameter->attribute = cpystr ("BOUNDARY");
 
110
!       body->parameter->value = cpystr (tmp);
 
111
!     }
 
112
!     part = body->nested.part; /* encode body parts */
 
113
!     do pine_encode_body (&part->body);
 
114
!     while (part = part->next);        /* until done */
 
115
      break;
 
116
  /* case MESSAGE:      */      /* here for documentation */
 
117
      /* Encapsulated messages are always treated as text objects at this point.
 
118
--- 8518,8536 ----
 
119
    dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
 
120
    if (body) switch (body->type) {
 
121
    case TYPEMULTIPART:         /* multi-part */
 
122
!     if (body->topal_hack != 1){
 
123
!       if (!body->parameter) { /* cookie not set up yet? */
 
124
!       char tmp[MAILTMPLEN];   /* make cookie not in BASE64 or QUOTEPRINT*/
 
125
!       sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),time (0),
 
126
!                getpid ());
 
127
!       body->parameter = mail_newbody_parameter ();
 
128
!       body->parameter->attribute = cpystr ("BOUNDARY");
 
129
!       body->parameter->value = cpystr (tmp);
 
130
!       }
 
131
!       part = body->nested.part;       /* encode body parts */
 
132
!       do pine_encode_body (&part->body);
 
133
!       while (part = part->next);      /* until done */
 
134
!     }
 
135
      break;
 
136
  /* case MESSAGE:      */      /* here for documentation */
 
137
      /* Encapsulated messages are always treated as text objects at this point.
 
138
***************
 
139
*** 8688,8694 ****
 
140
  
 
141
      dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
 
142
               body ? body->type : 0));
 
143
!     if(body->type == TYPEMULTIPART) {   /* multipart gets special handling */
 
144
        part = body->nested.part;       /* first body part */
 
145
                                        /* find cookie */
 
146
        for (param = body->parameter; param && !cookie; param = param->next)
 
147
--- 8702,8709 ----
 
148
  
 
149
      dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
 
150
               body ? body->type : 0));
 
151
!     if(body->type == TYPEMULTIPART
 
152
!        && body->topal_hack != 1) {   /* multipart gets special handling */
 
153
        part = body->nested.part;       /* first body part */
 
154
                                        /* find cookie */
 
155
        for (param = body->parameter; param && !cookie; param = param->next)
 
156
***************
 
157
*** 8741,8747 ****
 
158
         * Convert text pieces to canonical form
 
159
         * BEFORE applying any encoding (rfc1341: appendix G)...
 
160
         */
 
161
!       if(body->type == TYPETEXT){
 
162
            gf_link_filter(gf_local_nvtnl, NULL);
 
163
  
 
164
  #if defined(DOS) || defined(OS2)
 
165
--- 8756,8763 ----
 
166
         * Convert text pieces to canonical form
 
167
         * BEFORE applying any encoding (rfc1341: appendix G)...
 
168
         */
 
169
!       if(body->type == TYPETEXT
 
170
!          | (body->type == TYPEMULTIPART && body->topal_hack == 1)){
 
171
            gf_link_filter(gf_local_nvtnl, NULL);
 
172
  
 
173
  #if defined(DOS) || defined(OS2)
 
174
***************
 
175
*** 8845,8859 ****
 
176
                              ? body->subtype
 
177
                              : rfc822_default_subtype (body->type))))
 
178
          return(pwbh_finish(0, so));
 
179
!           
 
180
        if (param){
 
181
!           do
 
182
!             if(!(so_puts(so, "; ")
 
183
!                  && rfc2231_output(so, param->attribute, param->value,
 
184
!                                    (char *) tspecials,
 
185
!                                    ps_global->VAR_CHAR_SET)))
 
186
!               return(pwbh_finish(0, so));
 
187
!           while (param = param->next);
 
188
        }
 
189
        else if(!so_puts(so, "; CHARSET=US-ASCII"))
 
190
          return(pwbh_finish(0, so));
 
191
--- 8861,8887 ----
 
192
                              ? body->subtype
 
193
                              : rfc822_default_subtype (body->type))))
 
194
          return(pwbh_finish(0, so));
 
195
!       
 
196
        if (param){
 
197
!         do
 
198
!           if(body->topal_hack == 1 
 
199
!              && !struncmp(param->attribute, "protocol", 9))
 
200
!             {
 
201
!               if(!(so_puts(so, "; \015\012\011")
 
202
!                    && rfc2231_output(so, param->attribute, param->value,
 
203
!                                      (char *) tspecials,
 
204
!                                      ps_global->VAR_CHAR_SET)))
 
205
!                 return(pwbh_finish(0, so));
 
206
!             }
 
207
!           else
 
208
!             {
 
209
!               if(!(so_puts(so, "; ")
 
210
!                    && rfc2231_output(so, param->attribute, param->value,
 
211
!                                      (char *) tspecials,
 
212
!                                      ps_global->VAR_CHAR_SET)))
 
213
!                 return(pwbh_finish(0, so));
 
214
!             }
 
215
!         while (param = param->next);
 
216
        }
 
217
        else if(!so_puts(so, "; CHARSET=US-ASCII"))
 
218
          return(pwbh_finish(0, so));
 
219
***************
 
220
*** 9111,9117 ****
 
221
      long  l = 0L;
 
222
      PART *part;
 
223
  
 
224
!     if(body->type == TYPEMULTIPART) {   /* multipart gets special handling */
 
225
        part = body->nested.part;       /* first body part */
 
226
        do                              /* for each part */
 
227
          l += send_body_size(&part->body);
 
228
--- 9139,9146 ----
 
229
      long  l = 0L;
 
230
      PART *part;
 
231
  
 
232
!     if(body->type == TYPEMULTIPART
 
233
!        && body->topal_hack != 1) {   /* multipart gets special handling */
 
234
        part = body->nested.part;       /* first body part */
 
235
        do                              /* for each part */
 
236
          l += send_body_size(&part->body);