Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2015 10:32:06 +0000 (UTC)
From:      Tony Finch <fanf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r282885 - head/usr.bin/whois
Message-ID:  <201505141032.t4EAW6Kk038901@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fanf
Date: Thu May 14 10:32:05 2015
New Revision: 282885
URL: https://svnweb.freebsd.org/changeset/base/282885

Log:
  whois: code cleanup
  
  Remove deprecated options.
  
  Use pedantically correct types.

Modified:
  head/usr.bin/whois/whois.c

Modified: head/usr.bin/whois/whois.c
==============================================================================
--- head/usr.bin/whois/whois.c	Thu May 14 10:31:37 2015	(r282884)
+++ head/usr.bin/whois/whois.c	Thu May 14 10:32:05 2015	(r282885)
@@ -119,7 +119,7 @@ main(int argc, char *argv[])
 
 	country = host = qnichost = NULL;
 	flags = use_qnichost = 0;
-	while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:QrR6")) != -1) {
+	while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:Qr")) != -1) {
 		switch (ch) {
 		case 'a':
 			host = ANICHOST;
@@ -166,15 +166,6 @@ main(int argc, char *argv[])
 		case 'r':
 			host = RNICHOST;
 			break;
-		case 'R':
-			warnx("-R is deprecated; use '-c ru' instead");
-			country = "ru";
-			break;
-		/* Remove in FreeBSD 10 */
-		case '6':
-			errx(EX_USAGE,
-				"-6 is deprecated; use -[aAflr] instead");
-			break;
 		case '?':
 		default:
 			usage();
@@ -300,8 +291,9 @@ whois(const char *query, const char *hos
 	FILE *fp;
 	struct addrinfo *hostres, *res;
 	char *buf, *host, *nhost, *p;
-	int i, j, s = -1, count;
-	size_t c, len;
+	int s = -1;
+	nfds_t i, j;
+	size_t c, len, count;
 	struct pollfd *fds;
 	int timeout = 180;
 
@@ -497,7 +489,7 @@ static void
 usage(void)
 {
 	fprintf(stderr,
-	    "usage: whois [-aAbfgiIklmQrR6] [-c country-code | -h hostname] "
+	    "usage: whois [-aAbfgiIklmQr] [-c country-code | -h hostname] "
 	    "[-p port] name ...\n");
 	exit(EX_USAGE);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505141032.t4EAW6Kk038901>