Clean up #includes

This commit is contained in:
FRIGN 2015-02-14 21:02:41 +01:00
parent 71fb259d02
commit 31572c8b0e
63 changed files with 45 additions and 145 deletions

View File

@ -1,7 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"

1
cat.c
View File

@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "text.h"

View File

@ -1,11 +1,8 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <errno.h>
#include <grp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "util.h"

View File

@ -1,8 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "util.h"

View File

@ -1,9 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"

2
cmp.c
View File

@ -1,8 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "util.h"

3
cols.c
View File

@ -1,10 +1,11 @@
/* See LICENSE file for copyright and license details. */
#include <sys/ioctl.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include "text.h"

1
comm.c
View File

@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

1
cp.c
View File

@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include <stdlib.h>
#include <sys/stat.h>
#include "fs.h"

3
cron.c
View File

@ -1,10 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
#include <limits.h>
#include <signal.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>

1
cut.c
View File

@ -3,7 +3,6 @@
#include <stdlib.h>
#include <string.h>
#include "text.h"
#include "utf.h"
#include "util.h"

2
date.c
View File

@ -1,9 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include "util.h"

View File

@ -1,8 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "util.h"

6
du.c
View File

@ -1,12 +1,12 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "util.h"

1
echo.c
View File

@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include "util.h"

View File

@ -1,9 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utf.h"
#include "util.h"

3
expr.c
View File

@ -1,8 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <inttypes.h>
#include <limits.h>
#include <regex.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

2
fold.c
View File

@ -1,10 +1,8 @@
/* See LICENSE file for copyright and license details. */
#include <ctype.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "util.h"

3
grep.c
View File

@ -3,11 +3,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include "queue.h"
#include "text.h"
#include "util.h"
enum { Match = 0, NoMatch = 1, Error = 2 };

3
head.c
View File

@ -1,10 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "util.h"

View File

@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

6
kill.c
View File

@ -1,13 +1,11 @@
/* See LICENSE file for copyright and license details. */
#include <sys/wait.h>
#include <ctype.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/wait.h>
#include <unistd.h>
#include "util.h"

1
link.c
View File

@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include <errno.h>
#include <unistd.h>
#include "util.h"

7
ln.c
View File

@ -1,11 +1,8 @@
/* See LICENSE file for copyright and license details. */
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "util.h"

View File

@ -2,7 +2,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#define SYSLOG_NAMES
#include <syslog.h>
#include <unistd.h>

3
ls.c
View File

@ -1,11 +1,12 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <dirent.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>

View File

@ -1,10 +1,9 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "util.h"

View File

@ -1,8 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include "util.h"

View File

@ -1,9 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <libgen.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "util.h"

5
mv.c
View File

@ -1,9 +1,8 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include "fs.h"
#include "util.h"

8
nice.c
View File

@ -1,10 +1,8 @@
/* See LICENSE file for copyright and license details. */
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>
#include <sys/time.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include "util.h"

3
nl.c
View File

@ -1,11 +1,8 @@
/* See LICENSE file for copyright and license details. */
#include <limits.h>
#include <regex.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "text.h"
#include "util.h"

View File

@ -1,10 +1,10 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include "util.h"

View File

@ -1,9 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <locale.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "utf.h"
#include "util.h"

4
pwd.c
View File

@ -1,8 +1,8 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include "util.h"

View File

@ -1,11 +1,10 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include "util.h"

View File

@ -1,12 +1,10 @@
/* See LICENSE file for copyright and license details. */
#include <errno.h>
#include <limits.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/resource.h>
#include <errno.h>
#include <pwd.h>
#include <stdlib.h>
#include "util.h"
static int strtop(const char *);

5
rm.c
View File

@ -1,9 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include "fs.h"
#include "util.h"

View File

@ -1,7 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

1
sed.c
View File

@ -15,7 +15,6 @@
#include <ctype.h>
#include <errno.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

2
seq.c
View File

@ -1,9 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "util.h"

View File

@ -1,8 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "util.h"

View File

@ -1,7 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "crypt.h"
#include "sha1.h"

View File

@ -1,7 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "crypt.h"
#include "sha256.h"

View File

@ -1,7 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "crypt.h"
#include "sha512.h"

View File

@ -1,6 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include "util.h"

1
sort.c
View File

@ -3,7 +3,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "text.h"
#include "util.h"

View File

@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <ctype.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,7 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include "util.h"

1
tail.c
View File

@ -1,7 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

2
tar.c
View File

@ -1,10 +1,8 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <grp.h>
#include <limits.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>

2
tee.c
View File

@ -1,8 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "util.h"

5
test.c
View File

@ -1,8 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <string.h>
#include <unistd.h>
#include "utf.h"

View File

@ -1,9 +1,9 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#include <utime.h>

1
tr.c
View File

@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include "utf.h"

View File

@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <sys/utsname.h>
#include <unistd.h>
#include <stdio.h>
#include "util.h"

View File

@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "utf.h"

4
uniq.c
View File

@ -1,11 +1,9 @@
/* See LICENSE file for copyright and license details. */
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include "text.h"
#include "util.h"
static void uniqline(FILE *, char *);

View File

@ -1,14 +1,11 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "text.h"
#include "util.h"
static int mflag = 0;

View File

@ -1,9 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include "util.h"

3
wc.c
View File

@ -1,7 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <unistd.h>
#include "utf.h"
#include "util.h"

View File

@ -1,12 +1,12 @@
/* See LICENSE file for copyright and license details. */
#include <sys/wait.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
#include "text.h"
#include "util.h"
enum {

1
yes.c
View File

@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include "util.h"