~ubuntu-branches/debian/stretch/alpine/stretch

« back to all changes in this revision

Viewing changes to pith/mailview.c

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2008-09-23 12:17:56 UTC
  • mfrom: (2.1.8 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080923121756-6u4x8bwq89qlzt32
Tags: 2.00+dfsg-2
Update to package description: note that Alpine is no longer in
alpha. (Closes: #499640)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#if !defined(lint) && !defined(DOS)
2
 
static char rcsid[] = "$Id: mailview.c 945 2008-03-05 18:56:28Z mikes@u.washington.edu $";
 
2
static char rcsid[] = "$Id: mailview.c 1111 2008-07-11 23:20:32Z hubert@u.washington.edu $";
3
3
#endif
4
4
 
5
5
/*
50
50
#include "../pith/ablookup.h"
51
51
#include "../pith/escapes.h"
52
52
#include "../pith/keyword.h"
 
53
#include "../pith/smime.h"
53
54
 
54
55
 
55
56
#define FBUF_LEN        (50)
246
247
             * using its charset.
247
248
             */
248
249
            if(body && body->type == TYPETEXT)
249
 
              charset = rfc2231_get_param(body->parameter, "charset", NULL, NULL);
 
250
              charset = parameter_val(body->parameter, "charset");
250
251
            else if(body && body->type == TYPEMULTIPART && body->nested.part
251
252
                    && body->nested.part->body.type == TYPETEXT)
252
 
              charset = rfc2231_get_param(body->nested.part->body.parameter, "charset", NULL, NULL);
 
253
              charset = parameter_val(body->nested.part->body.parameter, "charset");
253
254
            else
254
255
              charset = ps_global->display_charmap;
255
256
 
335
336
        /*======== Now loop through formatting all the parts =======*/
336
337
        for(a = ps_global->atmts; a->description != NULL; a++) {
337
338
 
338
 
            if(a->body->type == TYPEMULTIPART)
339
 
              continue;
 
339
            if(a->body->type == TYPEMULTIPART){
 
340
#ifdef SMIME
 
341
                if(strucmp(a->body->subtype, OUR_PKCS7_ENCLOSURE_SUBTYPE)==0){
 
342
                    if(a->description){
 
343
                        if(!(!format_editorial(a->description, width, flgs, handlesp, pc)
 
344
                             && gf_puts(NEWLINE, pc) && gf_puts(NEWLINE, pc)))
 
345
                          return("Write Error");
 
346
                    }
 
347
                }
 
348
#endif /* SMIME */
 
349
                continue;
 
350
            }
340
351
 
341
352
            if(!a->shown) {
342
353
                if(a->suppress_editorial)
402
413
                 * the first part of a message/rfc822 segment...
403
414
                 */
404
415
                if(show_parts && a != ps_global->atmts 
405
 
                   && a[-1].body && a[-1].body->type != TYPEMESSAGE
 
416
                   && !((a[-1].body && a[-1].body->type == TYPEMESSAGE)
 
417
#ifdef SMIME
 
418
                       || (a[-1].body->type == TYPEMULTIPART
 
419
                           && a[-1].body->subtype
 
420
                           && (strucmp(a[-1].body->subtype, OUR_PKCS7_ENCLOSURE_SUBTYPE)==0)
 
421
                           && &a[-1] != ps_global->atmts
 
422
                           && a[-2].body && a[-2].body->type == TYPEMESSAGE)
 
423
#endif /* SMIME */
 
424
                       )
406
425
                   && !(flgs & FM_NOEDITORIAL)){
407
426
                    tmp1 = a->body->description ? a->body->description
408
427
                      : "Attached Text";
635
654
            char numbuf[50];
636
655
            int thisdescwid, padwid;
637
656
 
 
657
#ifdef SMIME
 
658
            if(a->body->type == TYPEMULTIPART
 
659
               && (strucmp(a->body->subtype, OUR_PKCS7_ENCLOSURE_SUBTYPE)==0))
 
660
              continue;
 
661
#endif /* SMIME */
 
662
 
638
663
            i = utf8_width((descwid > 2 && a->description) ? a->description : "");
639
664
            thisdescwid = MIN(i, descwid);
640
665
            padwid = hdrcolor ? (descwid-thisdescwid) : 0;
2321
2346
 
2322
2347
    if((which & FE_DATE) && e->date) {
2323
2348
        q = "Date: ";
2324
 
        snprintf(buftmp, sizeof(buftmp), "%s", (char *) e->date);
 
2349
        snprintf(buftmp, sizeof(buftmp), "%s",
 
2350
                 F_ON(F_DATES_TO_LOCAL,ps_global)
 
2351
                    ? convert_date_to_local((char *) e->date) : (char *) e->date);
2325
2352
        buftmp[sizeof(buftmp)-1] = '\0';
2326
2353
        p2 = (char *)rfc1522_decode_to_utf8((unsigned char *) tmp_20k_buf,
2327
2354
                                            SIZEOF_20KBUF, buftmp);
2888
2915
 
2889
2916
 
2890
2917
char *    
2891
 
display_parameters(struct mail_body_parameter *params)
 
2918
display_parameters(PARAMETER *params)
2892
2919
{
2893
2920
    int         n, longest = 0;
2894
2921
    char       *d, *printme;