X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/99f2cebd3d1ac0946ce0f798d79f333218943574..dcef69d277225417e8027b45b6eda2aa29d8b3c9:/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 ccb0c812f2..a7ed484acf 100644 --- a/usr/src/usr.bin/mail/collect.c +++ b/usr/src/usr.bin/mail/collect.c @@ -7,7 +7,7 @@ * ~ escapes. */ -static char *SccsId = "@(#)collect.c 2.10 %G%"; +static char *SccsId = "@(#)collect.c 2.13 %G%"; #include "rcv.h" #include @@ -175,6 +175,7 @@ collect(hp) */ execute(&linebuf[2], 1); + printf("(continue)\n"); break; case '.': @@ -331,7 +332,7 @@ collect(hp) case '?': if ((fbuf = fopen(THELPFILE, "r")) == NULL) { - printf("No help just now.\n"); + perror(THELPFILE); break; } t = getc(fbuf); @@ -491,14 +492,14 @@ mesedit(ibuf, obuf, c) 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 - scont = sigset(SIGCONT, foonly); + scont = sigset(SIGCONT, signull); # endif VMUNIX if (stat(tempEdit, &sbuf) >= 0) { printf("%s: file exists\n", tempEdit); @@ -578,13 +579,6 @@ out: 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; @@ -701,7 +695,7 @@ forward(ms, obuf, f) touch(*ip); printf(" %d", *ip); if (f == 'm') { - if (transmit(&message[*ip-1], obuf) < 0) { + if (transmit(&message[*ip-1], obuf) < 0L) { perror(tempMail); return(-1); } @@ -722,28 +716,30 @@ forward(ms, obuf, f) * on error. */ +long 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); - c = msize(mp); + c = mp->m_size; n = c; bol = 1; - while (c-- > 0) { + while (c-- > 0L) { if (bol) { bol = 0; putc('\t', obuf); n++; if (ferror(obuf)) { perror("/tmp"); - return(-1); + return(-1L); } } ch = getc(ibuf); @@ -752,7 +748,7 @@ transmit(mailp, obuf) putc(ch, obuf); if (ferror(obuf)) { perror("/tmp"); - return(-1); + return(-1L); } } return(n);