~ubuntu-branches/debian/sid/alpine/sid

« back to all changes in this revision

Viewing changes to pith/mimedesc.c

  • Committer: Package Import Robot
  • Author(s): Unit 193
  • Date: 2015-05-01 19:52:36 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20150501195236-e2xjytpbb7ik352w
Tags: 2.20+dfsg1-1
* Imported Upstream version 2.20+dfsg1
  - Drop patches applied upstream.
  - Refresh remaining patches.
  - d/rules: Update SHA256 for alpine 2.20.
* Update Standards-Version to 3.9.6.
* d/watch: Narrow the regex to only match source tarballs.
* d/alpine-doc.docs: tech-notes.txt moved to under the tech-notes/ dir.
* d/control: Update Vcs-Browser for cgit.
* d/p/10_alpine_1.10_spooldir.patch: Fix a few more references.
* d/p/40_fix_browser_hardcoded_paths.patch:
  - Fix hardcoded paths to specific browsers.
* d/p/40_fix_tech_notes_hardcoded_paths.patch, d/rules:
  - Drop patch in favor of changing paths after the build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
/*
6
6
 * ========================================================================
7
7
 * Copyright 2006-2008 University of Washington
8
 
 * Copyright 2013 Eduardo Chappa
 
8
 * Copyright 2013-2015 Eduardo Chappa
9
9
 *
10
10
 * Licensed under the Apache License, Version 2.0 (the "License");
11
11
 * you may not use this file except in compliance with the License.
277
277
        snprintf(a->number, ll, "%s%d",prefix, num);
278
278
        a->number[ll-1] = '\0';
279
279
        (a+1)->description = NULL;
280
 
        if(body->type == TYPEMESSAGE && body->encoding <= ENCBINARY
 
280
        if(body->type == TYPEMESSAGE && body->encoding <= ENCBASE64
281
281
           && body->subtype && strucmp(body->subtype, "rfc822") == 0){
282
282
            body = body->nested.msg->body;
283
283
            snprintf(numx, sizeof(numx), "%.*s%d.", sizeof(numx)-20, prefix, num);
579
579
    }
580
580
 
581
581
    if(full && type != TYPEMULTIPART && type != TYPEMESSAGE){
 
582
        unsigned char decodebuf[10000];
582
583
        if((parmval = parameter_val(params, "name")) != NULL){
583
 
            snprintf(p, sizeof(type_d)-(p-type_d), " (Name: \"%s\")", parmval);
 
584
            rfc1522_decode_to_utf8(decodebuf, sizeof(decodebuf), parmval);
 
585
            snprintf(p, sizeof(type_d)-(p-type_d), " (Name: \"%s\")", decodebuf);
584
586
            fs_give((void **) &parmval);
585
587
        }
586
588
        else if((parmval = parameter_val(disp_params, "filename")) != NULL){
587
 
            snprintf(p, sizeof(type_d)-(p-type_d), " (Filename: \"%s\")", parmval);
 
589
            rfc1522_decode_to_utf8(decodebuf, sizeof(decodebuf), parmval);
 
590
            snprintf(p, sizeof(type_d)-(p-type_d), " (Filename: \"%s\")", decodebuf);
588
591
            fs_give((void **) &parmval);
589
592
        }
590
593
    }