resp = 0;
leave: ;
- lseek (fd1, (off_t) 0, SEEK_SET);
- lseek (fd2, (off_t) 0, SEEK_SET);
+ lseek(fd1, 0, SEEK_SET);
+ lseek(fd2, 0, SEEK_SET);
return resp;
}
char buf[BUFSIZ];
*eightbit = 0;
- lseek (fd, (off_t) 0, SEEK_SET);
+ lseek(fd, 0, SEEK_SET);
while ((state = read (fd, buf, sizeof buf)) > 0) {
if (contains8bit (buf, buf + state)) {
if ((tmpfd = open (tmpfil, O_RDONLY)) == NOTOK)
adios (tmpfil, "unable to open for re-reading");
- lseek (fd, (off_t) 0, SEEK_SET);
+ lseek(fd, 0, SEEK_SET);
/*
* We're making the file shorter if we're deleting a header field
chmod (drft, m_gmprot ());
ready_msg (msgnam);
- lseek (hdrfd, (off_t) 0, SEEK_SET); /* msgnam not accurate */
+ lseek(hdrfd, 0, SEEK_SET); /* msgnam not accurate */
cpydata (hdrfd, fileno (ofp), msgnam, drft);
for (resent = NULL;;) {
free (resent);
if (txtfd != NOTOK) {
- lseek (txtfd, (off_t) 0, SEEK_SET); /* msgnam not accurate */
+ lseek(txtfd, 0, SEEK_SET); /* msgnam not accurate */
cpydata (txtfd, fileno (ofp), msgnam, drft);
}
if (chmod (file, mode) < 0) {
advise (file, "chmod");
}
- } else if (st.st_size > (off_t) 0) {
+ } else if (st.st_size > 0) {
int status;
/* check the maildrop */
mbx_chk_mbox (int fd)
{
/* just seek to the end */
- if (lseek (fd, (off_t) 0, SEEK_END) == (off_t) NOTOK)
+ if (lseek(fd, 0, SEEK_END) == (off_t) NOTOK)
return NOTOK;
return OK;
}
fclose (fp);
- lseek (fd, (off_t) 0, SEEK_END);
+ lseek(fd, 0, SEEK_END);
return OK;
}
if (fclose (tmp))
adios (tmpfil, "error writing");
- lseek (in, (off_t) 0, SEEK_SET);
+ lseek(in, 0, SEEK_SET);
/*
* Free any component buffers that we allocated
int retval, state;
char buf[BUFSIZ];
- lseek (fd, (off_t) 0, SEEK_SET);
+ lseek(fd, 0, SEEK_SET);
while ((state = read (fd, buf, sizeof(buf))) > 0) {
if (rp_isbad (retval = sm_wtxt (buf, state)))
pidwait(child_id, OK);
alarm (0);
- if (fstat (fd, &st) != NOTOK && st.st_size > (off_t) 0)
+ if (fstat (fd, &st) != NOTOK && st.st_size > 0)
return fd;
} else {
/*
return;
}
- lseek (md, (off_t) 0, SEEK_SET);
+ lseek(md, 0, SEEK_SET);
while ((i = read (md, buffer, sizeof(buffer))) > 0)
if (write (td, buffer, i) != i)
adios (filter, "unable to read");
rewind (in);
- lseek (fileno(in), (off_t) 0, SEEK_SET);
+ lseek(fileno(in), 0, SEEK_SET);
arglist = argsplit(mhlproc, &mhl, &argnum);
if ((in = open (file, O_RDONLY)) == NOTOK) {
admonish (file, "unable to re-open");
} else {
- lseek (out, (off_t) 0, SEEK_END);
+ lseek(out, 0, SEEK_END);
strncpy (buf, "\nMessage not delivered to anyone.\n", sizeof(buf));
if (write (out, buf, strlen (buf)) < 0) {
advise (file, "write");
admonish (buf, "unable to rename %s to", file);
}
}
- lseek (out, (off_t) 0, SEEK_SET);
+ lseek(out, 0, SEEK_SET);
dup2 (out, fileno (stdin));
close (out);
/* create subject for error notification */
goto oops;
}
- lseek (fd, (off_t) 0, SEEK_SET);
+ lseek(fd, 0, SEEK_SET);
if ((fp = fdopen (fd, "r")) == NULL) {
if (debugsw)
inform("unable to fdopen annotation list, continuing...");
return -1;
}
- lseek (fd, (off_t) 0, SEEK_SET);
+ lseek(fd, 0, SEEK_SET);
/* append message to file */
if (mbx_copy (mailbox, mbx_style, md, fd, NULL) == -1) {
if (verbose && !suppress)
verbose_printf ("delivering to pipe \"%s\"", cmd);
- lseek (fd, (off_t) 0, SEEK_SET);
+ lseek(fd, 0, SEEK_SET);
for (i = 0; (child_id = fork()) == -1 && i < 5; i++)
sleep (5);
}
if (i == -1)
goto you_lose;
- lseek (fd1, (off_t) 0, SEEK_SET);
+ lseek(fd1, 0, SEEK_SET);
return fd1;
}
return -1;
}
fclose (qfp);
- lseek (fd1, (off_t) 0, SEEK_SET);
+ lseek(fd1, 0, SEEK_SET);
return fd1;