commit 31572c8b0eab99dc1647ea398eb895e73c4160ad
parent 71fb259d02be59a754e4b94443685ca530f40b09
Author: FRIGN <dev@frign.de>
Date: Sat, 14 Feb 2015 21:02:41 +0100
Clean up #includes
Diffstat:
| M | basename.c | | | 1 | - |
| M | cat.c | | | 1 | - |
| M | chgrp.c | | | 7 | ++----- |
| M | chmod.c | | | 3 | --- |
| M | cksum.c | | | 3 | --- |
| M | cmp.c | | | 2 | -- |
| M | cols.c | | | 3 | ++- |
| M | comm.c | | | 1 | - |
| M | cp.c | | | 1 | - |
| M | cron.c | | | 3 | --- |
| M | cut.c | | | 1 | - |
| M | date.c | | | 2 | -- |
| M | dirname.c | | | 2 | -- |
| M | du.c | | | 6 | +++--- |
| M | echo.c | | | 1 | - |
| M | expand.c | | | 3 | --- |
| M | expr.c | | | 3 | --- |
| M | fold.c | | | 2 | -- |
| M | grep.c | | | 3 | --- |
| M | head.c | | | 3 | --- |
| M | hostname.c | | | 1 | - |
| M | kill.c | | | 6 | ++---- |
| M | link.c | | | 1 | - |
| M | ln.c | | | 7 | ++----- |
| M | logger.c | | | 1 | - |
| M | ls.c | | | 3 | ++- |
| M | mkdir.c | | | 5 | ++--- |
| M | mkfifo.c | | | 5 | ++--- |
| M | mktemp.c | | | 2 | -- |
| M | mv.c | | | 5 | ++--- |
| M | nice.c | | | 6 | ++---- |
| M | nl.c | | | 3 | --- |
| M | nohup.c | | | 4 | ++-- |
| M | paste.c | | | 3 | --- |
| M | pwd.c | | | 4 | ++-- |
| M | readlink.c | | | 5 | ++--- |
| M | renice.c | | | 6 | ++---- |
| M | rm.c | | | 5 | ----- |
| M | rmdir.c | | | 2 | -- |
| M | sed.c | | | 1 | - |
| M | seq.c | | | 2 | -- |
| M | setsid.c | | | 3 | --- |
| M | sha1sum.c | | | 1 | - |
| M | sha256sum.c | | | 1 | - |
| M | sha512sum.c | | | 1 | - |
| M | sleep.c | | | 2 | -- |
| M | sort.c | | | 1 | - |
| M | split.c | | | 1 | - |
| M | strings.c | | | 1 | - |
| M | tail.c | | | 1 | - |
| M | tar.c | | | 2 | -- |
| M | tee.c | | | 2 | -- |
| M | test.c | | | 5 | ++--- |
| M | touch.c | | | 4 | ++-- |
| M | tr.c | | | 1 | - |
| M | uname.c | | | 4 | ++-- |
| M | unexpand.c | | | 1 | - |
| M | uniq.c | | | 4 | +--- |
| M | uudecode.c | | | 7 | ++----- |
| M | uuencode.c | | | 6 | ++---- |
| M | wc.c | | | 3 | --- |
| M | xargs.c | | | 4 | ++-- |
| M | yes.c | | | 1 | - |
63 files changed, 42 insertions(+), 142 deletions(-)
diff --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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 --dropbox 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"