Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/rlogin Remove #ifdef __STDC__. De-__P() and ANSIfy.



details:   https://anonhg.NetBSD.org/src/rev/50eb13546516
branches:  trunk
changeset: 532737:50eb13546516
user:      wiz <wiz%NetBSD.org@localhost>
date:      Fri Jun 14 00:55:47 2002 +0000

description:
Remove #ifdef __STDC__. De-__P() and ANSIfy.

diffstat:

 usr.bin/rlogin/kcmd.c   |    6 +-
 usr.bin/rlogin/krb.h    |   12 ++--
 usr.bin/rlogin/krcmd.c  |    8 +-
 usr.bin/rlogin/rlogin.c |  125 +++++++++++++++++------------------------------
 4 files changed, 59 insertions(+), 92 deletions(-)

diffs (truncated from 393 to 300 lines):

diff -r 0ca7f5f96a94 -r 50eb13546516 usr.bin/rlogin/kcmd.c
--- a/usr.bin/rlogin/kcmd.c     Fri Jun 14 00:55:18 2002 +0000
+++ b/usr.bin/rlogin/kcmd.c     Fri Jun 14 00:55:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kcmd.c,v 1.8 2002/06/02 13:50:17 itojun Exp $  */
+/*     $NetBSD: kcmd.c,v 1.9 2002/06/14 00:55:47 wiz Exp $     */
 
 /*
  * Copyright (c) 1983, 1993
@@ -39,7 +39,7 @@
 static char Xsccsid[] = "derived from @(#)rcmd.c 5.17 (Berkeley) 6/27/88";
 static char sccsid[] = "@(#)kcmd.c     8.2 (Berkeley) 8/19/93";
 #else
-__RCSID("$NetBSD: kcmd.c,v 1.8 2002/06/02 13:50:17 itojun Exp $");
+__RCSID("$NetBSD: kcmd.c,v 1.9 2002/06/14 00:55:47 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -73,7 +73,7 @@
 
 #define        START_PORT      5120     /* arbitrary */
 
-int    getport __P((int *));
+int    getport(int *);
 
 int
 kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, ticket, service, realm,
diff -r 0ca7f5f96a94 -r 50eb13546516 usr.bin/rlogin/krb.h
--- a/usr.bin/rlogin/krb.h      Fri Jun 14 00:55:18 2002 +0000
+++ b/usr.bin/rlogin/krb.h      Fri Jun 14 00:55:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: krb.h,v 1.6 1999/02/17 06:49:30 scottr Exp $   */
+/*     $NetBSD: krb.h,v 1.7 2002/06/14 00:55:48 wiz Exp $      */
 
 /*-
  * Copyright (c) 1993
@@ -39,10 +39,10 @@
  * XXX
  * These should be in a kerberos include file.
  */
-int    kcmd __P((int *, char **, u_short, char *, char *, char *, int *,
+int    kcmd(int *, char **, u_short, char *, char *, char *, int *,
            KTEXT, char *, char *, CREDENTIALS *, Key_schedule,
-           MSG_DAT *, struct sockaddr_in *, struct sockaddr_in *, long));
+           MSG_DAT *, struct sockaddr_in *, struct sockaddr_in *, long);
 
-int    krcmd __P((char **, u_short, char *, char *, int *, char *));
-int    krcmd_mutual __P((char **, u_short, char *, char *, int *,
-           char *, CREDENTIALS *, Key_schedule));
+int    krcmd(char **, u_short, char *, char *, int *, char *);
+int    krcmd_mutual(char **, u_short, char *, char *, int *,
+           char *, CREDENTIALS *, Key_schedule);
diff -r 0ca7f5f96a94 -r 50eb13546516 usr.bin/rlogin/krcmd.c
--- a/usr.bin/rlogin/krcmd.c    Fri Jun 14 00:55:18 2002 +0000
+++ b/usr.bin/rlogin/krcmd.c    Fri Jun 14 00:55:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: krcmd.c,v 1.6 1999/06/24 22:43:35 tls Exp $    */
+/*     $NetBSD: krcmd.c,v 1.7 2002/06/14 00:55:48 wiz Exp $    */
 
 /*
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)krcmd.c    8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: krcmd.c,v 1.6 1999/06/24 22:43:35 tls Exp $");
+__RCSID("$NetBSD: krcmd.c,v 1.7 2002/06/14 00:55:48 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -67,9 +67,9 @@
 
 #define        SERVICE_NAME    "rcmd"
 
-int    kcmd __P((int *, char **, u_short, char *, char *, char *, int *,
+int    kcmd(int *, char **, u_short, char *, char *, char *, int *,
            KTEXT, char *, char *, CREDENTIALS *, Key_schedule, MSG_DAT *,
-           struct sockaddr_in *, struct sockaddr_in *, long));
+           struct sockaddr_in *, struct sockaddr_in *, long);
 
 /*
  * krcmd: simplified version of Athena's "kcmd"
diff -r 0ca7f5f96a94 -r 50eb13546516 usr.bin/rlogin/rlogin.c
--- a/usr.bin/rlogin/rlogin.c   Fri Jun 14 00:55:18 2002 +0000
+++ b/usr.bin/rlogin/rlogin.c   Fri Jun 14 00:55:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rlogin.c,v 1.25 2001/02/19 23:03:51 cgd Exp $  */
+/*     $NetBSD: rlogin.c,v 1.26 2002/06/14 00:55:48 wiz Exp $  */
 
 /*
  * Copyright (c) 1983, 1990, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)rlogin.c   8.4 (Berkeley) 4/29/95";
 #else
-__RCSID("$NetBSD: rlogin.c,v 1.25 2001/02/19 23:03:51 cgd Exp $");
+__RCSID("$NetBSD: rlogin.c,v 1.26 2002/06/14 00:55:48 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -68,19 +68,14 @@
 #include <netdb.h>
 #include <pwd.h>
 #include <setjmp.h>
-#include <termios.h>
 #include <signal.h>
+#include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <termios.h>
 #include <unistd.h>
 
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
 #ifdef KERBEROS
 #include <kerberosIV/des.h>
 #include <kerberosIV/krb.h>
@@ -125,38 +120,36 @@
 #endif
 struct winsize winsize;
 
-void           catch_child __P((int));
-void           copytochild __P((int));
-void           doit __P((sigset_t *));
-void           done __P((int));
-void           echo __P((int));
-u_int          getescape __P((char *));
-void           lostpeer __P((int));
-int            main __P((int, char **));
-void           mode __P((int));
-void           msg __P((char *));
-void           oob __P((int));
-int            reader __P((sigset_t *));
-void           sendwindow __P((void));
-void           setsignal __P((int));
-int            speed __P((int));
-void           sigwinch __P((int));
-void           stop __P((int));
-void           usage __P((void));
-void           writer __P((void));
-void           writeroob __P((int));
+void           catch_child(int);
+void           copytochild(int);
+void           doit(sigset_t *);
+void           done(int);
+void           echo(int);
+u_int          getescape(char *);
+void           lostpeer(int);
+int            main(int, char **);
+void           mode(int);
+void           msg(char *);
+void           oob(int);
+int            reader(sigset_t *);
+void           sendwindow(void);
+void           setsignal(int);
+int            speed(int);
+void           sigwinch(int);
+void           stop(int);
+void           usage(void);
+void           writer(void);
+void           writeroob(int);
 
 #ifdef KERBEROS
-void           warning __P((const char *, ...));
+void           warning(const char *, ...);
 #endif
 #ifdef OLDSUN
-int            get_window_size __P((int, struct winsize *));
+int            get_window_size(int, struct winsize *);
 #endif
 
 int
-main(argc, argv)
-       int argc;
-       char *argv[];
+main(int argc, char *argv[])
 {
        struct passwd *pw;
        struct servent *sp;
@@ -438,8 +431,7 @@
 }
 
 int
-speed(fd)
-       int fd;
+speed(int fd)
 {
        struct termios tt;
 
@@ -453,8 +445,7 @@
 struct termios nott;
 
 void
-doit(smask)
-       sigset_t *smask;
+doit(sigset_t *smask)
 {
        int i;
        struct sigaction sa;
@@ -504,8 +495,7 @@
 
 /* trap a signal, unless it is being ignored. */
 void
-setsignal(sig)
-       int sig;
+setsignal(int sig)
 {
        struct sigaction sa;
        sigset_t sigs;
@@ -525,8 +515,7 @@
 }
 
 void
-done(status)
-       int status;
+done(int status)
 {
        pid_t w;
        int wstatus;
@@ -553,8 +542,7 @@
  * request to turn on the window-changing protocol.
  */
 void
-writeroob(signo)
-       int signo;
+writeroob(int signo)
 {
        struct sigaction sa;
 
@@ -569,8 +557,7 @@
 }
 
 void
-catch_child(signo)
-       int signo;
+catch_child(int signo)
 {
        int status;
        pid_t pid;
@@ -593,7 +580,7 @@
  * ~<delayed-suspend char>     suspend rlogin process, but leave reader alone.
  */
 void
-writer()
+writer(void)
 {
        int bol, local, n;
        char c;
@@ -672,8 +659,7 @@
 }
 
 void
-echo(i)
-       int i;
+echo(int i)
 {
        char c = (char)i;
        char *p;
@@ -696,8 +682,7 @@
 }
 
 void
-stop(all)
-       int all;
+stop(int all)
 {
        struct sigaction sa;
 
@@ -714,8 +699,7 @@
 }
 
 void
-sigwinch(signo)
-       int signo;
+sigwinch(int signo)
 {
        struct winsize ws;
 
@@ -730,7 +714,7 @@
  * Send the window size to the server via the magic escape
  */
 void
-sendwindow()
+sendwindow(void)
 {
        struct winsize *wp;
        char obuf[4 + sizeof (struct winsize)];
@@ -765,8 +749,7 @@
 char rcvbuf[8 * 1024];
 
 void
-oob(signo)
-       int signo;
+oob(int signo)
 {



Home | Main Index | Thread Index | Old Index