Introduction
Introduction Statistics Contact Development Disclaimer Help
tuse file names for attachments - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 141d60097223f56e82ae3c45c90d6453cdd11cba
parent e6c443621bbcc8929f4c08648bfd1ab6014b66b9
Author: rsc <devnull@localhost>
Date: Fri, 30 Jun 2006 04:53:51 +0000
use file names for attachments
Diffstat:
M src/cmd/acme/mail/mesg.c | 3 +++
M src/cmd/upas/nfs/box.h | 1 +
M src/cmd/upas/nfs/fs.c | 5 ++---
M src/cmd/upas/nfs/imap.c | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/cmd/acme/mail/mesg.c b/src/cmd/acme/mail/mesg.c
t@@ -161,6 +161,9 @@ loadinfo(Message *m, char *dir)
}else if(strcmp(s, "digest") == 0){
free(m->digest);
m->digest = estrdup(t);
+ }else if(strcmp(s, "filename") == 0){
+ free(m->filename);
+ m->filename = estrdup(t);
}
free(s);
}
diff --git a/src/cmd/upas/nfs/box.h b/src/cmd/upas/nfs/box.h
t@@ -93,6 +93,7 @@ struct Part
char* desc;
char* encoding;
char* charset;
+ char* filename;
char* raw;
char* rawheader;
char* rawbody;
diff --git a/src/cmd/upas/nfs/fs.c b/src/cmd/upas/nfs/fs.c
t@@ -604,9 +604,8 @@ filedata(int type, Box *box, Msg *msg, Part *part, char **…
fmtprint(&fmt, "type %s\n", part->type);
if(part->lines)
fmtprint(&fmt, "lines %d\n", part->lines);
- /* fmtprint(&fmt, "disposition %s\", ""); */
- /* fmtprint(&fmt, "filename %s\n", ""); */
- /* fmtprint(&fmt, "digest %s\n", ""); */
+ if(part->filename)
+ fmtprint(&fmt, "filename %s\n", part->filename);
s = fmtstrflush(&fmt);
if(s == nil)
s = estrdup("");
diff --git a/src/cmd/upas/nfs/imap.c b/src/cmd/upas/nfs/imap.c
t@@ -1458,7 +1458,8 @@ static struct {
char *name;
int offset;
} paramtab[] = {
- "charset", offsetof(Part, charset)
+ "charset", offsetof(Part, charset),
+ "name", offsetof(Part, filename)
};
static void
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.