diff --git a/usr.bin/netstat/atalk.c b/usr.bin/netstat/atalk.c index e1fe34daad4..6308e733d49 100644 --- a/usr.bin/netstat/atalk.c +++ b/usr.bin/netstat/atalk.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)atalk.c 1.1 (Whistle) 6/6/96"; */ static const char rcsid[] = - "$Id$"; + "$Id: atalk.c,v 1.9 1997/02/22 19:56:20 peter Exp $"; #endif /* not lint */ #include @@ -59,8 +59,6 @@ static const char rcsid[] = struct ddpcb ddpcb; struct socket sockb; -static void atalk_erputil __P((int, int)); - static int first = 1; /* diff --git a/usr.bin/netstat/ipx.c b/usr.bin/netstat/ipx.c index 0e8d34ff8d1..d68eae98ba3 100644 --- a/usr.bin/netstat/ipx.c +++ b/usr.bin/netstat/ipx.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)ns.c 8.1 (Berkeley) 6/6/93"; */ static const char rcsid[] = - "$Id: ipx.c,v 1.7 1997/02/22 19:56:22 peter Exp $"; + "$Id: ipx.c,v 1.8 1997/05/10 10:03:41 jhay Exp $"; #endif /* not lint */ #include @@ -72,7 +72,6 @@ struct spxpcb spxpcb; struct socket sockb; static char *ipx_prpr __P((struct ipx_addr *)); -static void ipx_erputil __P((int, int)); static int first = 1; diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 08e15ee10f2..c9e7c429341 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -32,13 +32,17 @@ */ #ifndef lint -char copyright[] = +char const copyright[] = "@(#) Copyright (c) 1983, 1988, 1993\n\ Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint +#if 0 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include @@ -49,6 +53,7 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; #include #include +#include #include #include #include @@ -59,7 +64,6 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; #include #include #include -#include #include "netstat.h" struct nlist nl[] = { @@ -231,19 +235,12 @@ main(argc, argv) int argc; char *argv[]; { - extern char *optarg; - extern int optind; register struct protoent *p; register struct protox *tp; /* for printing cblocks & stats */ - register char *cp; int ch; char *nlistf = NULL, *memf = NULL; char buf[_POSIX2_LINE_MAX]; - if ((cp = rindex(argv[0], '/'))) - prog = cp + 1; - else - prog = argv[0]; af = AF_UNSPEC; while ((ch = getopt(argc, argv, "Aabdf:ghI:iM:mN:np:rstuw:")) != -1) @@ -569,14 +566,11 @@ name2protox(name) static void usage() { - (void)fprintf(stderr, -"usage: %s [-Aan] [-f address_family] [-M core] [-N system]\n", prog); - (void)fprintf(stderr, -" %s [-bdghimnrs] [-f address_family] [-M core] [-N system]\n", prog); - (void)fprintf(stderr, -" %s [-bdn] [-I interface] [-M core] [-N system] [-w wait]\n", prog); - (void)fprintf(stderr, -" %s [-M core] [-N system] [-p protocol]\n", prog); + (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", +"usage: netstat [-Aan] [-f address_family] [-M core] [-N system]", +" netstat [-bdghimnrs] [-f address_family] [-M core] [-N system]", +" netstat [-bdn] [-I interface] [-M core] [-N system] [-w wait]", +" netstat [-M core] [-N system] [-p protocol]"); exit(1); } diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c index cfefa5e4e98..b80b5f54217 100644 --- a/usr.bin/netstat/mbuf.c +++ b/usr.bin/netstat/mbuf.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)mbuf.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include @@ -41,6 +45,7 @@ static char sccsid[] = "@(#)mbuf.c 8.1 (Berkeley) 6/6/93"; #include #include +#include #include #include "netstat.h" diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h index 708094f1bda..30e049c21d4 100644 --- a/usr.bin/netstat/netstat.h +++ b/usr.bin/netstat/netstat.h @@ -55,9 +55,6 @@ int unit; /* unit number for above */ int af; /* address family */ -char *prog; /* program name */ - - int kread __P((u_long addr, char *buf, int size)); char *plural __P((int)); char *plurales __P((int)); diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index e920aaaf945..6eb7b212a0b 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -36,7 +36,7 @@ static char sccsid[] = "From: @(#)route.c 8.6 (Berkeley) 4/28/95"; #endif static const char rcsid[] = - "$Id: route.c,v 1.26 1997/05/10 10:03:43 jhay Exp $"; + "$Id: route.c,v 1.27 1997/05/25 08:36:20 phk Exp $"; #endif /* not lint */ #include @@ -636,7 +636,6 @@ netname(in, mask) struct netent *np = 0; u_long net, omask, dmask; register u_long i; - int subnetshift; i = ntohl(in); omask = mask; @@ -697,8 +696,6 @@ ipx_print(sa) register struct sockaddr *sa; { u_short port; - struct netent *np = 0; - struct hostent *hp = 0; struct servent *sp = 0; char *net = "", *host = ""; register char *p; register u_char *q; @@ -765,7 +762,6 @@ ipx_phost(sa) static union ipx_net ipx_zeronet; char *p; struct ipx_addr in; - struct hostent *hp; work = *sipx; in = work.sipx_addr; diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c index 0309d1c30a4..a37da93002f 100644 --- a/usr.bin/netstat/unix.c +++ b/usr.bin/netstat/unix.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)unix.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ /*