Sun Jun 21 14:58:16 2009 UTC ()
Sync usage with man page.


(wiz)
diff -r1.13 -r1.14 src/usr.bin/ypcat/ypcat.c

cvs diff -r1.13 -r1.14 src/usr.bin/ypcat/ypcat.c (expand / switch to unified diff)

--- src/usr.bin/ypcat/ypcat.c 2009/06/20 19:27:26 1.13
+++ src/usr.bin/ypcat/ypcat.c 2009/06/21 14:58:16 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ypcat.c,v 1.13 2009/06/20 19:27:26 christos Exp $ */ 1/* $NetBSD: ypcat.c,v 1.14 2009/06/21 14:58:16 wiz Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca> 4 * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -18,27 +18,27 @@ @@ -18,27 +18,27 @@
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30#ifndef lint 30#ifndef lint
31__RCSID("$NetBSD: ypcat.c,v 1.13 2009/06/20 19:27:26 christos Exp $"); 31__RCSID("$NetBSD: ypcat.c,v 1.14 2009/06/21 14:58:16 wiz Exp $");
32#endif 32#endif
33 33
34#include <sys/param.h> 34#include <sys/param.h>
35#include <sys/types.h> 35#include <sys/types.h>
36#include <sys/socket.h> 36#include <sys/socket.h>
37#include <sys/errno.h> 37#include <sys/errno.h>
38#include <ctype.h> 38#include <ctype.h>
39#include <err.h> 39#include <err.h>
40#include <stdio.h> 40#include <stdio.h>
41#include <stdlib.h> 41#include <stdlib.h>
42#include <string.h> 42#include <string.h>
43#include <unistd.h> 43#include <unistd.h>
44 44
@@ -138,18 +138,18 @@ printit(int instatus, char *inkey, int i @@ -138,18 +138,18 @@ printit(int instatus, char *inkey, int i
138 if (indata) 138 if (indata)
139 (void)printf("%*.*s", inkeylen, inkeylen, inkey); 139 (void)printf("%*.*s", inkeylen, inkeylen, inkey);
140 if (invallen) 140 if (invallen)
141 (void)printf("%s%*.*s", (indata ? " " : ""), invallen, invallen, 141 (void)printf("%s%*.*s", (indata ? " " : ""), invallen, invallen,
142 inval); 142 inval);
143 (void)printf("\n"); 143 (void)printf("\n");
144 return 0; 144 return 0;
145} 145}
146 146
147static void 147static void
148usage(void) 148usage(void)
149{ 149{
150 150
151 (void)fprintf(stderr, "Usage: %s [-k] [-d domainname] [-t] mapname\n", 151 (void)fprintf(stderr, "Usage: %s [-kt] [-d domainname] mapname\n",
152 getprogname()); 152 getprogname());
153 (void)fprintf(stderr, " %s -x\n", getprogname()); 153 (void)fprintf(stderr, " %s -x\n", getprogname());
154 exit(1); 154 exit(1);
155} 155}