/[pkg-mixmaster]/trunk/Mix/Src/mime.c
ViewVC logotype

Diff of /trunk/Mix/Src/mime.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 331 by weaselp, Sat Aug 3 17:08:02 2002 UTC revision 332 by weaselp, Wed Oct 9 20:53:32 2002 UTC
# Line 6  Line 6 
6     details.     details.
7    
8     MIME functions     MIME functions
9     $Id: mime.c,v 1.3 2002/08/03 17:08:02 weaselp Exp $ */     $Id: mime.c,v 1.4 2002/10/09 20:53:29 weaselp Exp $ */
10    
11    
12  #include "mix3.h"  #include "mix3.h"
# Line 104  void body_encode(BUFFER *in, int transpo Line 104  void body_encode(BUFFER *in, int transpo
104              l++;              l++;
105            }            }
106          } else {          } else {
107            buf_appendc(out, c);            buf_appendc(out, c);
108            l++;            l++;
109          }          }
110        }        }
# Line 247  int decode_line(BUFFER *line) Line 247  int decode_line(BUFFER *line)
247          addprintable(out, c);          addprintable(out, c);
248        } else if (line->data[i + 1] == '\0') {        } else if (line->data[i + 1] == '\0') {
249          softbreak = 1;          softbreak = 1;
250          break;          break;
251        }        }
252      } else      } else
253        addprintable(out, line->data[i]);        addprintable(out, line->data[i]);
# Line 365  int qp_decode_message(BUFFER *msg) Line 365  int qp_decode_message(BUFFER *msg)
365    /* copy over headers without decoding */    /* copy over headers without decoding */
366    while (buf_getheader(msg, field, content) == 0) {    while (buf_getheader(msg, field, content) == 0) {
367      if (bufieq(field, "content-transfer-encoding")      if (bufieq(field, "content-transfer-encoding")
368          && bufieq(content, "quoted-printable")) {          && bufieq(content, "quoted-printable")) {
369        continue;                 /* no longer quoted-printable */        continue;                 /* no longer quoted-printable */
370      } else {      } else {
371        buf_appendheader(out, field, content);        buf_appendheader(out, field, content);
# Line 421  int entity_decode(BUFFER *msg, int messa Line 421  int entity_decode(BUFFER *msg, int messa
421      if (bufieq(field, "content-type")) {      if (bufieq(field, "content-type")) {
422        get_type(content, type, subtype);        get_type(content, type, subtype);
423        if (bufieq(type, "multipart"))        if (bufieq(type, "multipart"))
424          get_parameter(content, "boundary", mboundary);          get_parameter(content, "boundary", mboundary);
425        if (bufieq(type, "multipart") && bufieq(subtype, "encrypted")) {        if (bufieq(type, "multipart") && bufieq(subtype, "encrypted")) {
426          get_parameter(content, "protocol", line);          get_parameter(content, "protocol", line);
427          if (bufieq(line, "application/pgp-encrypted"))          if (bufieq(line, "application/pgp-encrypted"))
# Line 615  int mime_attach(BUFFER *message, BUFFER Line 615  int mime_attach(BUFFER *message, BUFFER
615        get_type(content, type, subtype);        get_type(content, type, subtype);
616        if (bufieq(type, "multipart") && bufieq(subtype, "mixed")) {        if (bufieq(type, "multipart") && bufieq(subtype, "mixed")) {
617          multipart = 1;          multipart = 1;
618          get_parameter(content, "boundary", mboundary);          get_parameter(content, "boundary", mboundary);
619        }        }
620      }      }
621      if (bufileft(field, "content-"))      if (bufileft(field, "content-"))
# Line 717  static int entity_encode(BUFFER *message Line 717  static int entity_encode(BUFFER *message
717      if (bufieq(field, "content-type")) {      if (bufieq(field, "content-type")) {
718        get_type(content, line, tmp);        get_type(content, line, tmp);
719        if (bufieq(line, "multipart"))        if (bufieq(line, "multipart"))
720          get_parameter(content, "boundary", mboundary);          get_parameter(content, "boundary", mboundary);
721      }      }
722    }    }
723    

Legend:
Removed from v.331  
changed lines
  Added in v.332

  ViewVC Help
Powered by ViewVC 1.1.5