=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/lock/lock.c,v retrieving revision 1.38 retrieving revision 1.39 diff -c -r1.38 -r1.39 *** src/usr.bin/lock/lock.c 2017/07/08 22:19:23 1.38 --- src/usr.bin/lock/lock.c 2017/07/08 22:22:04 1.39 *************** *** 1,4 **** ! /* $OpenBSD: lock.c,v 1.38 2017/07/08 22:19:23 tedu Exp $ */ /* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: lock.c,v 1.39 2017/07/08 22:22:04 tedu Exp $ */ /* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */ /* *************** *** 66,74 **** int no_timeout; /* lock terminal forever */ - extern char *__progname; - - /*ARGSUSED*/ int main(int argc, char *argv[]) { --- 66,71 ---- *************** *** 132,138 **** default: (void)fprintf(stderr, "usage: %s [-np] [-a style] [-t timeout]\n", ! __progname); exit(1); } } --- 129,135 ---- default: (void)fprintf(stderr, "usage: %s [-np] [-a style] [-t timeout]\n", ! getprogname()); exit(1); } } *************** *** 181,191 **** if (no_timeout) { (void)fprintf(stderr, "%s: %s on %s. no timeout\ntime now is %s\n", ! __progname, ttynam, hostname, date); } else { (void)fprintf(stderr, "%s: %s on %s. timeout in %d minutes\ntime now is %s\n", ! __progname, ttynam, hostname, sectimeout, date); } for (cnt = 0;;) { --- 178,188 ---- if (no_timeout) { (void)fprintf(stderr, "%s: %s on %s. no timeout\ntime now is %s\n", ! getprogname(), ttynam, hostname, date); } else { (void)fprintf(stderr, "%s: %s on %s. timeout in %d minutes\ntime now is %s\n", ! getprogname(), ttynam, hostname, sectimeout, date); } for (cnt = 0;;) { *************** *** 231,243 **** exit(0); } - /*ARGSUSED*/ void hi(int signo) { struct itimerval left; ! (void)dprintf(STDERR_FILENO, "%s: type in the unlock key.", __progname); if (!no_timeout) { (void)getitimer(ITIMER_REAL, &left); (void)dprintf(STDERR_FILENO, " timeout in %lld:%02d minutes", --- 228,240 ---- exit(0); } void hi(int signo) { struct itimerval left; ! (void)dprintf(STDERR_FILENO, "%s: type in the unlock key.", ! getprogname()); if (!no_timeout) { (void)getitimer(ITIMER_REAL, &left); (void)dprintf(STDERR_FILENO, " timeout in %lld:%02d minutes", *************** *** 247,253 **** (void)dprintf(STDERR_FILENO, "\n"); } - /*ARGSUSED*/ void bye(int signo) { --- 244,249 ----