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
Fixed bug in marking a range; modified markall() to only mark messages
[unix-history]
/
usr
/
src
/
usr.bin
/
mail
/
collect.c
diff --git
a/usr/src/usr.bin/mail/collect.c
b/usr/src/usr.bin/mail/collect.c
index
a52c31a
..
b6a23e3
100644
(file)
--- a/
usr/src/usr.bin/mail/collect.c
+++ b/
usr/src/usr.bin/mail/collect.c
@@
-7,7
+7,7
@@
* ~ escapes.
*/
* ~ escapes.
*/
-static char *SccsId = "@(#)collect.c 2.
9
%G%";
+static char *SccsId = "@(#)collect.c 2.
12
%G%";
#include "rcv.h"
#include <sys/stat.h>
#include "rcv.h"
#include <sys/stat.h>
@@
-175,6
+175,7
@@
collect(hp)
*/
execute(&linebuf[2], 1);
*/
execute(&linebuf[2], 1);
+ printf("(continue)\n");
break;
case '.':
break;
case '.':
@@
-491,14
+492,14
@@
mesedit(ibuf, obuf, c)
int pid, s;
FILE *fbuf;
register int t;
int pid, s;
FILE *fbuf;
register int t;
- int (*sig)(), (*scont)(),
foonly
();
+ int (*sig)(), (*scont)(),
signull
();
struct stat sbuf;
extern char tempMail[], tempEdit[];
register char *edit;
sig = sigset(SIGINT, SIG_IGN);
# ifdef VMUNIX
struct stat sbuf;
extern char tempMail[], tempEdit[];
register char *edit;
sig = sigset(SIGINT, SIG_IGN);
# ifdef VMUNIX
- scont = sigset(SIGCONT,
foonly
);
+ scont = sigset(SIGCONT,
signull
);
# endif VMUNIX
if (stat(tempEdit, &sbuf) >= 0) {
printf("%s: file exists\n", tempEdit);
# endif VMUNIX
if (stat(tempEdit, &sbuf) >= 0) {
printf("%s: file exists\n", tempEdit);
@@
-578,13
+579,6
@@
out:
return(obuf);
}
return(obuf);
}
-/*
- * Currently, Berkeley virtual VAX/UNIX will not let you change the
- * disposition of SIGCONT, except to trap it somewhere new.
- * Hence, sigset(SIGCONT, foonly) is used to ignore continue signals.
- */
-foonly() {}
-
/*
* Pipe the message through the command.
* Old message is on stdin of command;
/*
* Pipe the message through the command.
* Old message is on stdin of command;
@@
-676,7
+670,6
@@
err:
* the message temporary. The flag argument is 'm' if we
* should shift over and 'f' if not.
*/
* the message temporary. The flag argument is 'm' if we
* should shift over and 'f' if not.
*/
-
forward(ms, obuf, f)
char ms[];
FILE *obuf;
forward(ms, obuf, f)
char ms[];
FILE *obuf;
@@
-702,12
+695,12
@@
forward(ms, obuf, f)
touch(*ip);
printf(" %d", *ip);
if (f == 'm') {
touch(*ip);
printf(" %d", *ip);
if (f == 'm') {
- if (transmit(&message[*ip-1], obuf) < 0) {
+ if (transmit(&message[*ip-1], obuf) < 0
L
) {
perror(tempMail);
return(-1);
}
} else
perror(tempMail);
return(-1);
}
} else
- if (send(&message[*ip-1], obuf) < 0) {
+ if (send(&message[*ip-1], obuf
, 0
) < 0) {
perror(tempMail);
return(-1);
}
perror(tempMail);
return(-1);
}
@@
-723,28
+716,30
@@
forward(ms, obuf, f)
* on error.
*/
* on error.
*/
+long
transmit(mailp, obuf)
struct message *mailp;
FILE *obuf;
{
register struct message *mp;
transmit(mailp, obuf)
struct message *mailp;
FILE *obuf;
{
register struct message *mp;
- register int c, ch;
- int n, bol;
+ register int ch;
+ long c, n;
+ int bol;
FILE *ibuf;
mp = mailp;
ibuf = setinput(mp);
FILE *ibuf;
mp = mailp;
ibuf = setinput(mp);
- c = m
size(mp)
;
+ c = m
p->m_size
;
n = c;
bol = 1;
n = c;
bol = 1;
- while (c-- > 0) {
+ while (c-- > 0
L
) {
if (bol) {
bol = 0;
putc('\t', obuf);
n++;
if (ferror(obuf)) {
perror("/tmp");
if (bol) {
bol = 0;
putc('\t', obuf);
n++;
if (ferror(obuf)) {
perror("/tmp");
- return(-1);
+ return(-1
L
);
}
}
ch = getc(ibuf);
}
}
ch = getc(ibuf);
@@
-753,7
+748,7
@@
transmit(mailp, obuf)
putc(ch, obuf);
if (ferror(obuf)) {
perror("/tmp");
putc(ch, obuf);
if (ferror(obuf)) {
perror("/tmp");
- return(-1);
+ return(-1
L
);
}
}
return(n);
}
}
return(n);