diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
commit | 02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch) | |
tree | f053238978479e408a2b83571443e132f30586ab /src/cmd/acme/mail | |
parent | c0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff) | |
parent | 3d1382b98a502d0c34d5ba2c462396acc515016e (diff) | |
download | plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2 plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/acme/mail')
-rw-r--r-- | src/cmd/acme/mail/dat.h | 1 | ||||
-rw-r--r-- | src/cmd/acme/mail/html.c | 2 | ||||
-rw-r--r-- | src/cmd/acme/mail/mail.c | 15 | ||||
-rw-r--r-- | src/cmd/acme/mail/mesg.c | 16 | ||||
-rw-r--r-- | src/cmd/acme/mail/reply.c | 8 | ||||
-rw-r--r-- | src/cmd/acme/mail/util.c | 1 | ||||
-rw-r--r-- | src/cmd/acme/mail/win.c | 2 |
7 files changed, 21 insertions, 24 deletions
diff --git a/src/cmd/acme/mail/dat.h b/src/cmd/acme/mail/dat.h index a7ac6a0b..66bb3a5d 100644 --- a/src/cmd/acme/mail/dat.h +++ b/src/cmd/acme/mail/dat.h @@ -178,4 +178,3 @@ extern int shortmenu; extern CFsys *mailfs; extern CFsys *acmefs; - diff --git a/src/cmd/acme/mail/html.c b/src/cmd/acme/mail/html.c index e3a956b0..e193fc4d 100644 --- a/src/cmd/acme/mail/html.c +++ b/src/cmd/acme/mail/html.c @@ -67,7 +67,7 @@ char* readbody(char *type, char *dir, int *np) { char *body; - + body = readfile(dir, "body", np); if(body != nil && strcmp(type, "text/html") == 0) return formathtml(body, np); diff --git a/src/cmd/acme/mail/mail.c b/src/cmd/acme/mail/mail.c index d79721f8..e1047bb8 100644 --- a/src/cmd/acme/mail/mail.c +++ b/src/cmd/acme/mail/mail.c @@ -558,16 +558,16 @@ mainctl(void *v) Unknown: print("unknown message %c%c\n", e->c1, e->c2); break; - + case 'E': /* write to body; can't affect us */ break; - + case 'F': /* generated by our actions; ignore */ break; - + case 'K': /* type away; we don't care */ break; - + case 'M': switch(e->c2){ case 'x': @@ -597,7 +597,7 @@ mainctl(void *v) if(na) free(s); break; - + case 'l': case 'L': buf = nil; @@ -628,17 +628,16 @@ mainctl(void *v) winwriteevent(w, e); free(buf); break; - + case 'I': /* modify away; we don't care */ case 'D': case 'd': case 'i': break; - + default: goto Unknown; } } } } - diff --git a/src/cmd/acme/mail/mesg.c b/src/cmd/acme/mail/mesg.c index 9bfe10e1..739ce10a 100644 --- a/src/cmd/acme/mail/mesg.c +++ b/src/cmd/acme/mail/mesg.c @@ -85,7 +85,7 @@ mkaddrs(char *t, char **colon) int i, nf, inquote; char **f, *s; Fmt fmt; - + inquote = 0; nf = 2; for(s=t; *s; s++){ @@ -127,7 +127,7 @@ loadinfo(Message *m, char *dir) data = readfile(dir, "info", &n); if(data == nil) return 0; - + p = data; while((s = line(p, &p)) != nil && *s != 0){ t = strchr(s, ' '); @@ -282,7 +282,7 @@ mesgadd(Message *mbox, char *dir, Dir *d, char *digest) if (m->level != 1){ m->recursed = 1; - readmbox(m, dir, m->name); + readmbox(m, dir, m->name); } return 1; } @@ -351,7 +351,7 @@ readfile(char *dir, char *name, int *np) fsseek(fid, 0, 0); free(d); d = fsdirfstat(fid); - } + } free(file); len = 0; if(d != nil) @@ -400,13 +400,13 @@ info(Message *m, int ind, int ogf) i = estrdup(s); return i; - } + } i = estrdup(""); i = eappend(i, "\t", p); i = egrow(i, "\t", stripdate(m->date)); if(ind == 0){ - if(strcmp(m->type, "text")!=0 && strncmp(m->type, "text/", 5)!=0 && + if(strcmp(m->type, "text")!=0 && strncmp(m->type, "text/", 5)!=0 && strncmp(m->type, "multipart/", 10)!=0) i = egrow(i, "\t(", estrstrdup(m->type, ")")); }else if(strncmp(m->type, "multipart/", 10) != 0) @@ -647,7 +647,7 @@ mesgsave(Message *m, char *s, int save) } return 1; } - + t = estrstrdup(mbox.name, m->name); raw = readfile(t, "raw", &n); unixheader = readfile(t, "unixheader", &k); @@ -1160,7 +1160,7 @@ tokenizec(char *str, char **args, int max, char *splitc) if(max <= 0) return 0; - + /* if(strchr(str, ',') || strchr(str, '"') || strchr(str, '<') || strchr(str, '(')) */ /* splitc = ","; */ for(na=0; *str != '\0';str++){ diff --git a/src/cmd/acme/mail/reply.c b/src/cmd/acme/mail/reply.c index 5dda0edc..f28cbef1 100644 --- a/src/cmd/acme/mail/reply.c +++ b/src/cmd/acme/mail/reply.c @@ -78,7 +78,7 @@ mkreply(Message *m, char *label, char *to, Plumbattr *attr, char *quotetext) Plumbattr *a; quotereply = (label[0] == 'Q'); - + if(quotereply && m && m->replywinid > 0){ snprint(buf, sizeof buf, "%d/body", m->replywinid); if((fd = fsopen(acmefs, buf, OWRITE)) != nil){ @@ -88,7 +88,7 @@ mkreply(Message *m, char *label, char *to, Plumbattr *attr, char *quotetext) return; } } - + r = emalloc(sizeof(Message)); r->isreply = 1; if(m != nil) @@ -212,7 +212,7 @@ execproc(void *v) q[0] = e->q[0]; q[1] = e->q[1]; prog = e->prog; /* known not to be malloc'ed */ - + fd[0] = dup(p[0], -1); if(q[0]) fd[1] = dup(q[1], -1); @@ -224,7 +224,7 @@ execproc(void *v) free(e->argv); chanfree(e->sync); free(e); - + threadexec(nil, fd, prog, argv); close(fd[0]); close(fd[1]); diff --git a/src/cmd/acme/mail/util.c b/src/cmd/acme/mail/util.c index 888e7e72..8ac9f946 100644 --- a/src/cmd/acme/mail/util.c +++ b/src/cmd/acme/mail/util.c @@ -104,4 +104,3 @@ ctlprint(CFid *fd, char *fmt, ...) if(n <= 0) error("control file write error: %r"); } - diff --git a/src/cmd/acme/mail/win.c b/src/cmd/acme/mail/win.c index 84c9cee0..1cf776dd 100644 --- a/src/cmd/acme/mail/win.c +++ b/src/cmd/acme/mail/win.c @@ -196,7 +196,7 @@ wingeter(Window *w, char *buf, int *nb) while(!fullrune(buf, n)) buf[n++] = wingetec(w); chartorune(&r, buf); - } + } *nb = n; return r; } |