[hackers] [sbase] Clean up #includes || FRIGN
commit eaa7a783aa4ea703f926c117e0c34c70680807ea
Author: FRIGN <dev_AT_frign.de>
Date: Sat Feb 14 21:02:41 2015 +0100
Clean up #includes
diff --git a/basename.c b/basename.c
index 3c50cc3..fb30d0b 100644
--- a/basename.c
+++ b/basename.c
_AT_@ -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
index fbf8069..77131d1 100644
--- a/cat.c
+++ b/cat.c
_AT_@ -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
index 75e22d2..ede0233 100644
--- a/chgrp.c
+++ b/chgrp.c
_AT_@ -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
index efbd17f..9fbdf4e 100644
--- a/chmod.c
+++ b/chmod.c
_AT_@ -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
index ea61ae4..6f099fa 100644
--- a/cksum.c
+++ b/cksum.c
_AT_@ -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
index bca4c0f..9d9f41e 100644
--- a/cmp.c
+++ b/cmp.c
_AT_@ -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
index d2d5734..572dbe0 100644
--- a/cols.c
+++ b/cols.c
_AT_@ -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
index ac2111b..a005882 100644
--- a/comm.c
+++ b/comm.c
_AT_@ -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
index 25fc07e..c7be281 100644
--- a/cp.c
+++ b/cp.c
_AT_@ -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
index 6e12521..d530723 100644
--- a/cron.c
+++ b/cron.c
_AT_@ -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
index a5fb195..d846cce 100644
--- a/cut.c
+++ b/cut.c
_AT_@ -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
index db69091..fb7e8e5 100644
--- a/date.c
+++ b/date.c
_AT_@ -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
index c7ead85..b055deb 100644
--- a/dirname.c
+++ b/dirname.c
_AT_@ -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
index e18bae0..3763bec 100644
--- a/du.c
+++ b/du.c
_AT_@ -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
index e96fc53..2ae8af9 100644
--- a/echo.c
+++ b/echo.c
_AT_@ -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
index c643df7..6b00439 100644
--- a/expand.c
+++ b/expand.c
_AT_@ -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
index c36e56a..e98255e 100644
--- a/expr.c
+++ b/expr.c
_AT_@ -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
index 50da75d..14c0812 100644
--- a/fold.c
+++ b/fold.c
_AT_@ -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
index 4db2c09..14a9e66 100644
--- a/grep.c
+++ b/grep.c
_AT_@ -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
index 8fb0195..a66520e 100644
--- a/head.c
+++ b/head.c
_AT_@ -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
index c55c897..55ed0ca 100644
--- a/hostname.c
+++ b/hostname.c
_AT_@ -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
index 04f86e2..031a5a1 100644
--- a/kill.c
+++ b/kill.c
_AT_@ -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
index d2ae634..f84e4b5 100644
--- a/link.c
+++ b/link.c
_AT_@ -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
index 31fac10..8843a49 100644
--- a/ln.c
+++ b/ln.c
_AT_@ -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
index d8d0fc7..0eb1156 100644
--- a/logger.c
+++ b/logger.c
_AT_@ -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
index 4ac0da2..81b7f7d 100644
--- a/ls.c
+++ b/ls.c
_AT_@ -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
index e1380a3..d1f43be 100644
--- a/mkdir.c
+++ b/mkdir.c
_AT_@ -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
index 5bad406..cc6209c 100644
--- a/mkfifo.c
+++ b/mkfifo.c
_AT_@ -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
index 0d00e42..08796cd 100644
--- a/mktemp.c
+++ b/mktemp.c
_AT_@ -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
index 605e9d8..4464ff7 100644
--- a/mv.c
+++ b/mv.c
_AT_@ -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
index 261918f..9f5b1a3 100644
--- a/nice.c
+++ b/nice.c
_AT_@ -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
index be904ba..e24050d 100644
--- a/nl.c
+++ b/nl.c
_AT_@ -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
index e8195c0..7543b41 100644
--- a/nohup.c
+++ b/nohup.c
_AT_@ -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
index 1b06433..a80ca35 100644
--- a/paste.c
+++ b/paste.c
_AT_@ -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
index 18f0eac..d721cde 100644
--- a/pwd.c
+++ b/pwd.c
_AT_@ -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
index 682fdc2..8c50f47 100644
--- a/readlink.c
+++ b/readlink.c
_AT_@ -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
index 53805db..5bfe6ce 100644
--- a/renice.c
+++ b/renice.c
_AT_@ -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
index ae2f591..867e207 100644
--- a/rm.c
+++ b/rm.c
_AT_@ -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
index e6c3cdd..e5ad2b9 100644
--- a/rmdir.c
+++ b/rmdir.c
_AT_@ -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
index ad7e729..e0d753e 100644
--- a/sed.c
+++ b/sed.c
_AT_@ -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
index e352ab2..e3e856b 100644
--- a/seq.c
+++ b/seq.c
_AT_@ -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
index 3941e77..e97d1a2 100644
--- a/setsid.c
+++ b/setsid.c
_AT_@ -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
index 3865581..2157156 100644
--- a/sha1sum.c
+++ b/sha1sum.c
_AT_@ -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
index 908dc26..0eb6c22 100644
--- a/sha256sum.c
+++ b/sha256sum.c
_AT_@ -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
index a467f12..2abff76 100644
--- a/sha512sum.c
+++ b/sha512sum.c
_AT_@ -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
index 4c53e44..7148718 100644
--- a/sleep.c
+++ b/sleep.c
_AT_@ -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
index 6184b0b..031343e 100644
--- a/sort.c
+++ b/sort.c
_AT_@ -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
index b14d7e3..a5250c7 100644
--- a/split.c
+++ b/split.c
_AT_@ -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
index 8f071c2..9d077a1 100644
--- a/strings.c
+++ b/strings.c
_AT_@ -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
index 9f7eca3..491861e 100644
--- a/tail.c
+++ b/tail.c
_AT_@ -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
index b081f00..7083b5c 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -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
index 0b4ad8b..98f9095 100644
--- a/tee.c
+++ b/tee.c
_AT_@ -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
index 283ee32..c96adc8 100644
--- a/test.c
+++ b/test.c
_AT_@ -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
index 536807a..e836e27 100644
--- a/touch.c
+++ b/touch.c
_AT_@ -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
index a38153d..9e52835 100644
--- a/tr.c
+++ b/tr.c
_AT_@ -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
index 827b075..f0e9264 100644
--- a/uname.c
+++ b/uname.c
_AT_@ -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
index 17852b6..7f490cb 100644
--- a/unexpand.c
+++ b/unexpand.c
_AT_@ -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
index 1e7d09c..534da1f 100644
--- a/uniq.c
+++ b/uniq.c
_AT_@ -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
index adc48f4..6bf259c 100644
--- a/uudecode.c
+++ b/uudecode.c
_AT_@ -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
index 55061e7..55ac6d1 100644
--- a/uuencode.c
+++ b/uuencode.c
_AT_@ -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
index 2a881a5..ae6c1be 100644
--- a/wc.c
+++ b/wc.c
_AT_@ -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
index e253299..2d8f12b 100644
--- a/xargs.c
+++ b/xargs.c
_AT_@ -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
index 92be761..0ac224a 100644
--- a/yes.c
+++ b/yes.c
_AT_@ -1,6 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
-#include <stdlib.h>
#include "util.h"
Received on Sat Feb 14 2015 - 21:19:43 CET
This archive was generated by hypermail 2.3.0
: Sat Feb 14 2015 - 21:24:08 CET