diff options
author | mestre <mestre@cvs.openbsd.org> | 2016-01-04 11:58:36 +0000 |
---|---|---|
committer | mestre <mestre@cvs.openbsd.org> | 2016-01-04 11:58:36 +0000 |
commit | ed9026dfcd232c84037ca0020e525458d0ae02f5 (patch) | |
tree | 49545bf4115bcbfcf7294d289432cfa8af8c18c9 /games | |
parent | d1517391756ff138dc7ebe533213587a4fd03d23 (diff) |
More headers removal and sorted the remaining alphabetically.
Most noticeable that were removed are sys/types.h which will be included from
stdlib.h and in turn also brings along sys/cdefs.h. The other one is limits.h
that was used with the old idiom (denom * random() / LONG_MAX), although it was
only removed were applicable (some files still need that header).
OK tb@
Diffstat (limited to 'games')
-rw-r--r-- | games/factor/factor.c | 6 | ||||
-rw-r--r-- | games/fish/fish.c | 5 | ||||
-rw-r--r-- | games/fortune/fortune/fortune.c | 13 | ||||
-rw-r--r-- | games/fortune/strfile/strfile.c | 18 | ||||
-rw-r--r-- | games/fortune/unstr/unstr.c | 16 | ||||
-rw-r--r-- | games/primes/pr_tbl.c | 3 | ||||
-rw-r--r-- | games/primes/primes.c | 4 | ||||
-rw-r--r-- | games/random/random.c | 5 |
8 files changed, 33 insertions, 37 deletions
diff --git a/games/factor/factor.c b/games/factor/factor.c index 3cfeb8b3cd5..96d917cdd57 100644 --- a/games/factor/factor.c +++ b/games/factor/factor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: factor.c,v 1.24 2015/12/30 14:07:53 tb Exp $ */ +/* $OpenBSD: factor.c,v 1.25 2016/01/04 11:58:35 mestre Exp $ */ /* $NetBSD: factor.c,v 1.5 1995/03/23 08:28:07 cgd Exp $ */ /* @@ -52,11 +52,9 @@ * If no args are given, the list of numbers are read from stdin. */ -#include <sys/types.h> -#include <err.h> #include <ctype.h> +#include <err.h> #include <errno.h> -#include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> diff --git a/games/fish/fish.c b/games/fish/fish.c index c201933cc20..750932e9361 100644 --- a/games/fish/fish.c +++ b/games/fish/fish.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fish.c,v 1.20 2016/01/03 14:38:17 mestre Exp $ */ +/* $OpenBSD: fish.c,v 1.21 2016/01/04 11:58:35 mestre Exp $ */ /* $NetBSD: fish.c,v 1.3 1995/03/23 08:28:18 cgd Exp $ */ /*- @@ -33,7 +33,6 @@ * SUCH DAMAGE. */ -#include <sys/types.h> #include <sys/wait.h> #include <err.h> @@ -41,8 +40,8 @@ #include <paths.h> #include <stdio.h> #include <stdlib.h> -#include <unistd.h> #include <string.h> +#include <unistd.h> #include "pathnames.h" diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c index 3250420be74..226016af719 100644 --- a/games/fortune/fortune/fortune.c +++ b/games/fortune/fortune/fortune.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fortune.c,v 1.48 2015/12/25 20:59:09 mestre Exp $ */ +/* $OpenBSD: fortune.c,v 1.49 2016/01/04 11:58:35 mestre Exp $ */ /* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */ /*- @@ -35,18 +35,19 @@ #include <sys/stat.h> +#include <assert.h> +#include <ctype.h> #include <dirent.h> #include <fcntl.h> -#include <assert.h> -#include <unistd.h> +#include <limits.h> #include <stdio.h> -#include <ctype.h> #include <stdlib.h> #include <string.h> -#include <limits.h> #include <regex.h> -#include "strfile.h" +#include <unistd.h> + #include "pathnames.h" +#include "strfile.h" #define bool short diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c index 42a94c12fa2..cf207cd7fe6 100644 --- a/games/fortune/strfile/strfile.c +++ b/games/fortune/strfile/strfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strfile.c,v 1.25 2016/01/03 14:38:17 mestre Exp $ */ +/* $OpenBSD: strfile.c,v 1.26 2016/01/04 11:58:35 mestre Exp $ */ /* $NetBSD: strfile.c,v 1.4 1995/04/24 12:23:09 cgd Exp $ */ /*- @@ -33,15 +33,15 @@ * SUCH DAMAGE. */ -#include <ctype.h> -#include <err.h> -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> +#include <ctype.h> +#include <err.h> +#include <limits.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> -#include "strfile.h" +#include "strfile.h" /* * This program takes a file composed of strings separated by diff --git a/games/fortune/unstr/unstr.c b/games/fortune/unstr/unstr.c index 43bcb645a54..edfef6cd98f 100644 --- a/games/fortune/unstr/unstr.c +++ b/games/fortune/unstr/unstr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unstr.c,v 1.11 2014/11/16 04:49:48 guenther Exp $ */ +/* $OpenBSD: unstr.c,v 1.12 2016/01/04 11:58:35 mestre Exp $ */ /* $NetBSD: unstr.c,v 1.3 1995/03/23 08:29:00 cgd Exp $ */ /*- @@ -46,12 +46,14 @@ * Ken Arnold Aug 13, 1978 */ -#include <ctype.h> -#include <err.h> -#include <limits.h> -#include <stdio.h> -#include <string.h> -#include "strfile.h" +#include <ctype.h> +#include <err.h> +#include <limits.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "strfile.h" char *Infile, /* name of input file */ Datafile[PATH_MAX], /* name of data file */ diff --git a/games/primes/pr_tbl.c b/games/primes/pr_tbl.c index fc0bed2aece..a46dd255934 100644 --- a/games/primes/pr_tbl.c +++ b/games/primes/pr_tbl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pr_tbl.c,v 1.5 2009/10/27 23:59:26 deraadt Exp $ */ +/* $OpenBSD: pr_tbl.c,v 1.6 2016/01/04 11:58:35 mestre Exp $ */ /* $NetBSD: pr_tbl.c,v 1.3 1995/03/23 08:35:52 cgd Exp $ */ /* @@ -45,6 +45,7 @@ */ #include <sys/types.h> + #include "primes.h" const ubig prime[] = { diff --git a/games/primes/primes.c b/games/primes/primes.c index 148ddb2359e..1867220bd6a 100644 --- a/games/primes/primes.c +++ b/games/primes/primes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: primes.c,v 1.19 2015/12/25 20:59:09 mestre Exp $ */ +/* $OpenBSD: primes.c,v 1.20 2016/01/04 11:58:35 mestre Exp $ */ /* $NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $ */ /* @@ -50,11 +50,9 @@ * validation check: there are 664579 primes between 0 and 10^7 */ -#include <sys/types.h> #include <ctype.h> #include <err.h> #include <errno.h> -#include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> diff --git a/games/random/random.c b/games/random/random.c index 6b38a8ada38..e9eefa3d8ff 100644 --- a/games/random/random.c +++ b/games/random/random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: random.c,v 1.16 2016/01/03 14:38:17 mestre Exp $ */ +/* $OpenBSD: random.c,v 1.17 2016/01/04 11:58:35 mestre Exp $ */ /* $NetBSD: random.c,v 1.3 1995/04/22 07:44:05 cgd Exp $ */ /* @@ -33,14 +33,11 @@ * SUCH DAMAGE. */ -#include <sys/types.h> - #include <err.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> -#include <limits.h> __dead void usage(void); |