copylet from int to long for PDP-11's. Thanks to Jay Lepreau for these.
SCCS-vsn: libexec/mail.local/mail.local.c 4.14
#include <setjmp.h>
#include <sysexits.h>
#include <setjmp.h>
#include <sysexits.h>
-static char SccsId[] = "@(#)mail.local.c 4.13 %G%";
+static char SccsId[] = "@(#)mail.local.c 4.14 %G%";
#define SENDMAIL "/usr/lib/sendmail"
#define SENDMAIL "/usr/lib/sendmail"
let[nlet].adr = nextadr; /* last plus 1 */
}
let[nlet].adr = nextadr; /* last plus 1 */
}
-copylet(n, f, type) FILE *f;
-{ int ch, k;
+copylet(n, f, type)
+ FILE *f;
+{
+ int ch;
+ long k;
+
fseek(tmpf, let[n].adr, 0);
k = let[n+1].adr - let[n].adr;
while(k-- > 1 && (ch=fgetc(tmpf))!='\n')
fseek(tmpf, let[n].adr, 0);
k = let[n+1].adr - let[n].adr;
while(k-- > 1 && (ch=fgetc(tmpf))!='\n')
mask = umask(MAILMODE);
if (!safefile(file))
return(0);
mask = umask(MAILMODE);
if (!safefile(file))
return(0);
malf = fopen(file, "a");
umask(mask);
if (malf == NULL) {
malf = fopen(file, "a");
umask(mask);
if (malf == NULL) {
fprintf(stdout, "mail: cannot append to %s\n", file);
return(0);
}
fprintf(stdout, "mail: cannot append to %s\n", file);
return(0);
}
chown(file, pw->pw_uid, pw->pw_gid);
{
hp = gethostbyname("localhost");
chown(file, pw->pw_uid, pw->pw_gid);
{
hp = gethostbyname("localhost");