commit 31572c8b0eab99dc1647ea398eb895e73c4160ad
parent 71fb259d02be59a754e4b94443685ca530f40b09
Author: FRIGN <dev@frign.de>
Date: Sat, 14 Feb 2015 21:02:41 +0100
Clean up #includes
Diffstat:
63 files changed, 42 insertions(+), 142 deletions(-)
diff --git a/basename.c b/basename.c
@@ -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"
diff --git a/cat.c b/cat.c
@@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
#include "text.h"
diff --git a/chgrp.c b/chgrp.c
@@ -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"
diff --git a/chmod.c b/chmod.c
@@ -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"
diff --git a/cksum.c b/cksum.c
@@ -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"
diff --git a/cmp.c b/cmp.c
@@ -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"
diff --git a/cols.c b/cols.c
@@ -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"
diff --git a/comm.c b/comm.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/cp.c b/cp.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <stdlib.h>
#include <sys/stat.h>
#include "fs.h"
diff --git a/cron.c b/cron.c
@@ -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>
diff --git a/cut.c b/cut.c
@@ -3,7 +3,6 @@
#include <stdlib.h>
#include <string.h>
-#include "text.h"
#include "utf.h"
#include "util.h"
diff --git a/date.c b/date.c
@@ -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"
diff --git a/dirname.c b/dirname.c
@@ -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"
diff --git a/du.c b/du.c
@@ -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"
diff --git a/echo.c b/echo.c
@@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
-#include <stdlib.h>
#include "util.h"
diff --git a/expand.c b/expand.c
@@ -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"
diff --git a/expr.c b/expr.c
@@ -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>
diff --git a/fold.c b/fold.c
@@ -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"
diff --git a/grep.c b/grep.c
@@ -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 };
diff --git a/head.c b/head.c
@@ -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"
diff --git a/hostname.c b/hostname.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
diff --git a/kill.c b/kill.c
@@ -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"
diff --git a/link.c b/link.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <errno.h>
#include <unistd.h>
#include "util.h"
diff --git a/ln.c b/ln.c
@@ -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"
diff --git a/logger.c b/logger.c
@@ -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>
diff --git a/ls.c b/ls.c
@@ -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>
diff --git a/mkdir.c b/mkdir.c
@@ -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"
diff --git a/mkfifo.c b/mkfifo.c
@@ -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"
diff --git a/mktemp.c b/mktemp.c
@@ -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"
diff --git a/mv.c b/mv.c
@@ -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"
diff --git a/nice.c b/nice.c
@@ -1,10 +1,8 @@
/* See LICENSE file for copyright and license details. */
+#include <sys/resource.h>
+
#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
#include <stdlib.h>
-#include <sys/resource.h>
-#include <sys/time.h>
#include <unistd.h>
#include "util.h"
diff --git a/nl.c b/nl.c
@@ -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"
diff --git a/nohup.c b/nohup.c
@@ -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"
diff --git a/paste.c b/paste.c
@@ -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"
diff --git a/pwd.c b/pwd.c
@@ -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"
diff --git a/readlink.c b/readlink.c
@@ -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"
diff --git a/renice.c b/renice.c
@@ -1,11 +1,9 @@
/* See LICENSE file for copyright and license details. */
+#include <sys/resource.h>
+
#include <errno.h>
-#include <limits.h>
#include <pwd.h>
-#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-#include <sys/resource.h>
#include "util.h"
diff --git a/rm.c b/rm.c
@@ -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"
diff --git a/rmdir.c b/rmdir.c
@@ -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>
diff --git a/sed.c b/sed.c
@@ -15,7 +15,6 @@
#include <ctype.h>
#include <errno.h>
#include <regex.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/seq.c b/seq.c
@@ -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"
diff --git a/setsid.c b/setsid.c
@@ -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"
diff --git a/sha1sum.c b/sha1sum.c
@@ -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"
diff --git a/sha256sum.c b/sha256sum.c
@@ -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"
diff --git a/sha512sum.c b/sha512sum.c
@@ -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"
diff --git a/sleep.c b/sleep.c
@@ -1,6 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <limits.h>
-#include <stdlib.h>
#include <unistd.h>
#include "util.h"
diff --git a/sort.c b/sort.c
@@ -3,7 +3,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include "text.h"
#include "util.h"
diff --git a/split.c b/split.c
@@ -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>
diff --git a/strings.c b/strings.c
@@ -1,7 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <ctype.h>
#include <stdio.h>
-#include <stdlib.h>
#include "util.h"
diff --git a/tail.c b/tail.c
@@ -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>
diff --git a/tar.c b/tar.c
@@ -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>
diff --git a/tee.c b/tee.c
@@ -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"
diff --git a/test.c b/test.c
@@ -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"
diff --git a/touch.c b/touch.c
@@ -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>
diff --git a/tr.c b/tr.c
@@ -1,5 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <stdio.h>
#include <stdlib.h>
#include "utf.h"
diff --git a/uname.c b/uname.c
@@ -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"
diff --git a/unexpand.c b/unexpand.c
@@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdint.h>
-#include <stdio.h>
#include <stdlib.h>
#include "utf.h"
diff --git a/uniq.c b/uniq.c
@@ -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 *);
diff --git a/uudecode.c b/uudecode.c
@@ -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;
diff --git a/uuencode.c b/uuencode.c
@@ -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"
diff --git a/wc.c b/wc.c
@@ -1,7 +1,4 @@
/* See LICENSE file for copyright and license details. */
-#include <stdio.h>
-#include <unistd.h>
-
#include "utf.h"
#include "util.h"
diff --git a/xargs.c b/xargs.c
@@ -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 {
diff --git a/yes.c b/yes.c
@@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
-#include <stdlib.h>
#include "util.h"