SCCS-vsn: usr.bin/mail/aux.c 5.17
SCCS-vsn: usr.bin/mail/main.c 5.24
SCCS-vsn: usr.bin/mail/tty.c 5.9
-static char sccsid[] = "@(#)aux.c 5.16 (Berkeley) %G%";
+static char sccsid[] = "@(#)aux.c 5.17 (Berkeley) %G%";
#endif /* not lint */
#include "rcv.h"
#include <sys/stat.h>
#endif /* not lint */
#include "rcv.h"
#include <sys/stat.h>
/*
* Mail -- a mail program
/*
* Mail -- a mail program
* This is nifty for the shell.
*/
alter(name)
* This is nifty for the shell.
*/
alter(name)
- struct stat statb;
- long time();
- time_t time_p[2];
+ struct stat sb;
+ struct timeval tv[2];
+ time_t time();
- if (stat(name, &statb) < 0)
- time_p[0] = time((long *) 0) + 1;
- time_p[1] = statb.st_mtime;
- utime(name, time_p);
+ tv[0].tv_sec = time((time_t *)0) + 1;
+ tv[1].tv_sec = sb.st_mtime;
+ tv[0].tv_usec = tv[1].tv_usec = 0;
+ (void)utimes(name, tv);
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 5.23 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 5.24 (Berkeley) %G%";
#endif /* not lint */
#include "rcv.h"
#endif /* not lint */
#include "rcv.h"
if (ioctl(1, TIOCGWINSZ, (char *) &ws) < 0)
ws.ws_col = ws.ws_row = 0;
if (ioctl(1, TIOCGWINSZ, (char *) &ws) < 0)
ws.ws_col = ws.ws_row = 0;
- if (gtty(1, &tbuf) < 0)
+ if (ioctl(1, TIOCGETP, &tbuf) < 0)
tbuf.sg_ospeed = B9600;
if (tbuf.sg_ospeed < B1200)
screenheight = 9;
tbuf.sg_ospeed = B9600;
if (tbuf.sg_ospeed < B1200)
screenheight = 9;
-static char sccsid[] = "@(#)tty.c 5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)tty.c 5.9 (Berkeley) %G%";
#ifndef TIOCSTI
ttyset = 0;
#endif
#ifndef TIOCSTI
ttyset = 0;
#endif
- if (gtty(fileno(stdin), &ttybuf) < 0) {
+ if (ioctl(fileno(stdin), TIOCGETP, &ttybuf) < 0) {
perror("gtty");
return(-1);
}
perror("gtty");
return(-1);
}