projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed to version 2.1
[unix-history]
/
usr
/
src
/
usr.bin
/
mail
/
cmd1.c
diff --git
a/usr/src/usr.bin/mail/cmd1.c
b/usr/src/usr.bin/mail/cmd1.c
index
82f6e7c
..
fe84684
100644
(file)
--- a/
usr/src/usr.bin/mail/cmd1.c
+++ b/
usr/src/usr.bin/mail/cmd1.c
@@
-8,7
+8,7
@@
* User commands.
*/
* User commands.
*/
-static char *SccsId = "@(#)cmd1.c 1.
7
%G%";
+static char *SccsId = "@(#)cmd1.c 1.
9
%G%";
/*
* Print the current active headings.
/*
* Print the current active headings.
@@
-149,6
+149,8
@@
printhead(mesg)
dispc = 'N';
if ((mp->m_flag & (MREAD|MNEW)) == 0)
dispc = 'U';
dispc = 'N';
if ((mp->m_flag & (MREAD|MNEW)) == 0)
dispc = 'U';
+ if (mp->m_flag & MBOX)
+ dispc = 'M';
parse(headline, &hl, pbuf);
sprintf(wcount, " %d/%d", mp->m_lines, mp->m_size);
s = strlen(wcount);
parse(headline, &hl, pbuf);
sprintf(wcount, " %d/%d", mp->m_lines, mp->m_size);
s = strlen(wcount);
@@
-222,7
+224,7
@@
type(msgvec)
pclose(obuf);
pipef = NULL;
}
pclose(obuf);
pipef = NULL;
}
- sig
nal
(SIGPIPE, SIG_DFL);
+ sig
set
(SIGPIPE, SIG_DFL);
return(0);
}
if (intty && outtty && (cp = value("crt")) != NOSTR) {
return(0);
}
if (intty && outtty && (cp = value("crt")) != NOSTR) {
@@
-236,7
+238,7
@@
type(msgvec)
}
else {
pipef = obuf;
}
else {
pipef = obuf;
- sig
nal
(SIGPIPE, brokpipe);
+ sig
set
(SIGPIPE, brokpipe);
}
}
}
}
}
}
@@
-251,7
+253,7
@@
type(msgvec)
pclose(obuf);
pipef = NULL;
}
pclose(obuf);
pipef = NULL;
}
- sig
nal
(SIGPIPE, SIG_DFL);
+ sig
set
(SIGPIPE, SIG_DFL);
return(0);
}
return(0);
}
@@
-263,8
+265,8
@@
type(msgvec)
brokpipe()
{
brokpipe()
{
- signal(SIGPIPE, SIG_IGN);
longjmp(pipestop, 1);
longjmp(pipestop, 1);
+ sigrelse(SIGPIPE);
}
/*
}
/*
@@
-344,3
+346,20
@@
stouch(msgvec)
}
return(0);
}
}
return(0);
}
+
+/*
+ * Make sure all passed messages get mboxed.
+ */
+
+mboxit(msgvec)
+ int msgvec[];
+{
+ register int *ip;
+
+ for (ip = msgvec; *ip != 0; ip++) {
+ dot = &message[*ip-1];
+ dot->m_flag |= MTOUCH|MBOX;
+ dot->m_flag &= ~MPRESERVE;
+ }
+ return(0);
+}