* Don't include headers twice

* Remove a few trailing whitespaces
 * Rearrange and join to one #if for some headers

Patch contributed by Slava Semushin <slava.semushin@gmail.com>
in private mail.
This commit is contained in:
hubertf 2007-01-16 17:32:04 +00:00
parent ae8983cebf
commit 889da1779b
17 changed files with 34 additions and 56 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: btconfig.c,v 1.3 2006/08/27 11:41:58 plunky Exp $ */
/* $NetBSD: btconfig.c,v 1.4 2007/01/16 17:32:04 hubertf Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@ -34,13 +34,12 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2006 Itronix, Inc.\n"
"All rights reserved.\n");
__RCSID("$NetBSD: btconfig.c,v 1.3 2006/08/27 11:41:58 plunky Exp $");
__RCSID("$NetBSD: btconfig.c,v 1.4 2007/01/16 17:32:04 hubertf Exp $");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: eehandlers.c,v 1.12 2006/11/20 20:36:12 christos Exp $ */
/* $NetBSD: eehandlers.c,v 1.13 2007/01/16 17:32:04 hubertf Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -41,7 +41,6 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ofhandlers.c,v 1.2 2006/12/10 03:06:25 macallan Exp $ */
/* $NetBSD: ofhandlers.c,v 1.3 2007/01/16 17:32:04 hubertf Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -41,7 +41,6 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ophandlers.c,v 1.8 2000/11/28 22:31:37 mrg Exp $ */
/* $NetBSD: ophandlers.c,v 1.9 2007/01/16 17:32:04 hubertf Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -41,7 +41,6 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: inetd.c,v 1.102 2007/01/02 16:00:46 rillig Exp $ */
/* $NetBSD: inetd.c,v 1.103 2007/01/16 17:32:05 hubertf Exp $ */
/*-
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@ -73,7 +73,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1991, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)inetd.c 8.4 (Berkeley) 4/13/94";
#else
__RCSID("$NetBSD: inetd.c,v 1.102 2007/01/02 16:00:46 rillig Exp $");
__RCSID("$NetBSD: inetd.c,v 1.103 2007/01/16 17:32:05 hubertf Exp $");
#endif
#endif /* not lint */
@ -1880,7 +1880,6 @@ discard_dg(int s, struct servtab *sep) /* Discard service -- ignore data */
(void) read(s, buffer, sizeof(buffer));
}
#include <ctype.h>
#define LINESIZ 72
char ring[128];
char *endring;

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.7 2003/11/12 13:31:07 grant Exp $ */
/* $NetBSD: main.c,v 1.8 2007/01/16 17:32:05 hubertf Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -55,7 +55,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#else
#include <stdarg.h>
#include <windows.h>
extern char *optarg;
int getopt(int nargc, char * const nargv[], const char *ostr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660.c,v 1.17 2006/12/18 21:03:29 christos Exp $ */
/* $NetBSD: cd9660.c,v 1.18 2007/01/16 17:32:05 hubertf Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@ -97,23 +97,20 @@
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#else
#include <sys/mount.h>
#endif
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
__RCSID("$NetBSD: cd9660.c,v 1.17 2006/12/18 21:03:29 christos Exp $");
__RCSID("$NetBSD: cd9660.c,v 1.18 2007/01/16 17:32:05 hubertf Exp $");
#endif /* !__lint */
#include <string.h>
#include <ctype.h>
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/queue.h>
#if !HAVE_NBTOOL_CONFIG_H
#include <sys/mount.h>
#endif
#include "makefs.h"
#include "cd9660.h"
#include "cd9660/iso9660_rrip.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_strings.c,v 1.3 2005/12/24 20:56:41 perry Exp $ */
/* $NetBSD: cd9660_strings.c,v 1.4 2007/01/16 17:32:05 hubertf Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@ -34,22 +34,19 @@
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#else
#include <sys/mount.h>
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <ctype.h>
#if !HAVE_NBTOOL_CONFIG_H
#include <sys/mount.h>
#endif
#include "makefs.h"
#include "cd9660.h"
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
__RCSID("$NetBSD: cd9660_strings.c,v 1.3 2005/12/24 20:56:41 perry Exp $");
__RCSID("$NetBSD: cd9660_strings.c,v 1.4 2007/01/16 17:32:05 hubertf Exp $");
#endif /* !__lint */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mountd.c,v 1.111 2006/09/02 11:10:24 yamt Exp $ */
/* $NetBSD: mountd.c,v 1.112 2007/01/16 17:32:04 hubertf Exp $ */
/*
* Copyright (c) 1989, 1993
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: mountd.c,v 1.111 2006/09/02 11:10:24 yamt Exp $");
__RCSID("$NetBSD: mountd.c,v 1.112 2007/01/16 17:32:04 hubertf Exp $");
#endif
#endif /* not lint */
@ -85,7 +85,6 @@ __RCSID("$NetBSD: mountd.c,v 1.111 2006/09/02 11:10:24 yamt Exp $");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netgroup.h>
#include <err.h>
#include <util.h>
#include "pathnames.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: moused.c,v 1.15 2005/06/02 06:03:53 lukem Exp $ */
/* $NetBSD: moused.c,v 1.16 2007/01/16 17:32:05 hubertf Exp $ */
/**
** Copyright (c) 1995 Michael Smith, All rights reserved.
**
@ -48,7 +48,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: moused.c,v 1.15 2005/06/02 06:03:53 lukem Exp $");
__RCSID("$NetBSD: moused.c,v 1.16 2007/01/16 17:32:05 hubertf Exp $");
#endif /* not lint */
#include <ctype.h>
@ -60,7 +60,6 @@ __RCSID("$NetBSD: moused.c,v 1.15 2005/06/02 06:03:53 lukem Exp $");
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <signal.h>
#include <setjmp.h>
#include <termios.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ndp.c,v 1.36 2006/10/22 21:24:44 christos Exp $ */
/* $NetBSD: ndp.c,v 1.37 2007/01/16 17:32:04 hubertf Exp $ */
/* $KAME: ndp.c,v 1.121 2005/07/13 11:30:13 keiichi Exp $ */
/*
@ -104,7 +104,6 @@
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <err.h>
#include "gmt2local.h"
/* packing rule for routing socket */

View File

@ -1,4 +1,4 @@
/* $NetBSD: tdb.c,v 1.5 2006/05/25 01:22:53 christos Exp $ */
/* $NetBSD: tdb.c,v 1.6 2007/01/16 17:32:05 hubertf Exp $ */
/*
* Database functions
@ -21,7 +21,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: tdb.c,v 1.5 2006/05/25 01:22:53 christos Exp $");
__RCSID("$NetBSD: tdb.c,v 1.6 2007/01/16 17:32:05 hubertf Exp $");
#endif
#include <stdlib.h>
@ -29,7 +29,6 @@ __RCSID("$NetBSD: tdb.c,v 1.5 2006/05/25 01:22:53 christos Exp $");
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/mman.h>
#include <sys/stat.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: pvcsif.c,v 1.3 2001/05/07 14:00:23 kleink Exp $ */
/* $NetBSD: pvcsif.c,v 1.4 2007/01/16 17:32:05 hubertf Exp $ */
/*
* Copyright (C) 1998
@ -36,7 +36,6 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <net/if_atm.h>
@ -51,7 +50,7 @@ void usage(void)
exit(1);
}
int
int
main(int argc, char **argv)
{
struct ifreq ifr;
@ -91,7 +90,7 @@ main(int argc, char **argv)
else
printf("created a pvc subinterface %s (bound to %s)\n",
ifr.ifr_name, argv[1]);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pvctxctl.c,v 1.4 2004/10/30 15:08:49 dsl Exp $ */
/* $NetBSD: pvctxctl.c,v 1.5 2007/01/16 17:32:05 hubertf Exp $ */
/*
* Copyright (C) 1998
@ -37,7 +37,6 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <net/if_atm.h>
@ -64,7 +63,7 @@ int getinfo = 1;
int subinterface = 0;
int verbose = 1;
int
int
main(int argc, char **argv)
{
struct pvctxreq pvcreq;
@ -78,7 +77,7 @@ main(int argc, char **argv)
if_name = argv[1];
if (argc > 2 && isdigit((unsigned char)argv[2][0]))
str2vc(argv[2], &vpi, &vci);
optind = 3;
while ((ch = getopt(argc, argv, "p:b:j:snv")) != -1) {
switch (ch) {
@ -173,7 +172,7 @@ main(int argc, char **argv)
printf("pcr:%d(%dKbps)\n", pcr, pcr * 48 * 8 / 1000);
else
printf("pcr:%d(%dMbps)\n", pcr, pcr * 48 * 8 / 1000000);
close(s);
if (getinfo && pcr < 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtadvd.c,v 1.33 2006/10/07 17:27:57 elad Exp $ */
/* $NetBSD: rtadvd.c,v 1.34 2007/01/16 17:32:04 hubertf Exp $ */
/* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */
/*
@ -49,7 +49,6 @@
#include <time.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <err.h>
#include <errno.h>
#include <string.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: getnobj.c,v 1.2 2000/02/22 06:06:07 mjacob Exp $ */
/* $NetBSD: getnobj.c,v 1.3 2007/01/16 17:32:05 hubertf Exp $ */
/* $FreeBSD: $ */
/* $OpenBSD: $ */
/*
@ -34,7 +34,6 @@
* mjacob@feral.com
*/
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: veriexecgen.c,v 1.13 2007/01/09 13:53:31 mjf Exp $ */
/* $NetBSD: veriexecgen.c,v 1.14 2007/01/16 17:32:04 hubertf Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@ -39,12 +39,10 @@
#ifndef lint
#ifdef __RCSID
__RCSID("$NetBSD: veriexecgen.c,v 1.13 2007/01/09 13:53:31 mjf Exp $");
__RCSID("$NetBSD: veriexecgen.c,v 1.14 2007/01/16 17:32:04 hubertf Exp $");
#endif
#endif /* not lint */
#include <sys/types.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/queue.h>