projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
de3930e
)
Implement fix in 59b086daa57105e8fbd8b1e6ba60be6a845faf95 here as well.
author
Ken Hornstein
<kenh@pobox.com>
Mon, 2 Apr 2012 19:38:40 +0000
(15:38 -0400)
committer
Ken Hornstein
<kenh@pobox.com>
Mon, 2 Apr 2012 19:38:40 +0000
(15:38 -0400)
uip/mhlsbr.c
patch
|
blob
|
history
diff --git
a/uip/mhlsbr.c
b/uip/mhlsbr.c
index
d49314f
..
faa7f71
100644
(file)
--- a/
uip/mhlsbr.c
+++ b/
uip/mhlsbr.c
@@
-223,6
+223,22
@@
static struct triple triples[] = {
{ NULL, 0, 0 }
};
{ NULL, 0, 0 }
};
+static char *addrcomps[] = {
+ "from",
+ "sender",
+ "reply-to",
+ "to",
+ "cc",
+ "bcc",
+ "resent-from",
+ "resent-sender",
+ "resent-reply-to",
+ "resent-to",
+ "resent-cc",
+ "resent-bcc",
+ NULL
+};
+
static int bellflg = 0;
static int clearflg = 0;
static int bellflg = 0;
static int clearflg = 0;
@@
-1907,10
+1923,22
@@
compileargs (struct mcomp *c1, char *nfs)
{
struct format *fmt;
struct arglist *args;
{
struct format *fmt;
struct arglist *args;
+ char *ap;
+ struct comp *cptr;
unsigned int i;
i = fmt_compile(nfs, &fmt);
unsigned int i;
i = fmt_compile(nfs, &fmt);
+ /*
+ * Search through and mark any components that are address components
+ */
+
+ for (ap = addrcomps; *ap; ap++) {
+ FINDCOMP (cptr, *ap);
+ if (cptr)
+ cptr->c_type |= CT_ADDR;
+ }
+
args = (struct arglist *) mh_xmalloc(sizeof(struct arglist));
if (! args)
args = (struct arglist *) mh_xmalloc(sizeof(struct arglist));
if (! args)
@@
-1971,9
+1999,7
@@
checkcomp(char *name, char *buf)
if (mh_strcasecmp(name, c->c_name) == 0) {
found++;
if (! c->c_text) {
if (mh_strcasecmp(name, c->c_name) == 0) {
found++;
if (! c->c_text) {
- i = strlen(c->c_text = strdup(buf)) - 1;
- if (c->c_text[i] == '\n')
- c->c_text[i] = '\0';
+ c->c_text = strdup(buf);
} else {
i = strlen(cp = c->c_text) - 1;
if (cp[i] == '\n') {
} else {
i = strlen(cp = c->c_text) - 1;
if (cp[i] == '\n') {