OSDN Git Service

Cleanup patch by Bernhard Fischer, removing unnecessary includes of
authorRob Landley <rob@landley.net>
Sun, 11 Sep 2005 01:05:30 +0000 (01:05 -0000)
committerRob Landley <rob@landley.net>
Sun, 11 Sep 2005 01:05:30 +0000 (01:05 -0000)
getopt.h, whitespace changes, typos, etc.

23 files changed:
archival/ar.c
archival/bunzip2.c
archival/cpio.c
archival/dpkg_deb.c
archival/gunzip.c
archival/libunarchive/unpack_ar_archive.c
archival/uncompress.c
archival/unzip.c
console-tools/setconsole.c
coreutils/cut.c
coreutils/date.c
coreutils/dos2unix.c
coreutils/env.c
coreutils/install.c
coreutils/ls.c
coreutils/mkdir.c
coreutils/mv.c
coreutils/stat.c
coreutils/sum.c
coreutils/uudecode.c
coreutils/uuencode.c
debianutils/readlink.c
debianutils/start_stop_daemon.c

index 21096d7..411a25e 100644 (file)
@@ -27,7 +27,6 @@
  */
 
 #include <fcntl.h>
-#include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 740e269..2ce6cfb 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include <fcntl.h>
-#include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -35,7 +34,7 @@ int bunzip2_main(int argc, char **argv)
                src_fd = STDIN_FILENO;
                filename = 0;
        }
-       
+
        /* if called as bzcat force the stdout flag */
        if ((opt & BUNZIP2_OPT_STDOUT) || bb_applet_name[2] == 'c')
                filename = 0;
index 0fbe7b8..820f03e 100644 (file)
  *
  */
 #include <fcntl.h>
-#include <getopt.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include "unarchive.h"
 #include "busybox.h"
 
-#define CPIO_OPT_EXTRACT               0x01
-#define CPIO_OPT_TEST                  0x02
-#define CPIO_OPT_UNCONDITIONAL         0x04
-#define CPIO_OPT_VERBOSE               0x08
-#define CPIO_OPT_FILE                  0x10
+#define CPIO_OPT_EXTRACT                       0x01
+#define CPIO_OPT_TEST                          0x02
+#define CPIO_OPT_UNCONDITIONAL         0x04
+#define CPIO_OPT_VERBOSE                       0x08
+#define CPIO_OPT_FILE                          0x10
 #define CPIO_OPT_CREATE_LEADING_DIR    0x20
-#define CPIO_OPT_PRESERVE_MTIME        0x40
+#define CPIO_OPT_PRESERVE_MTIME                0x40
 
 extern int cpio_main(int argc, char **argv)
 {
@@ -59,7 +58,7 @@ extern int cpio_main(int argc, char **argv)
        }
 
        if (opt & CPIO_OPT_TEST) {
-               /* if both extract and test option are given, ignore extract option */
+               /* if both extract and test options are given, ignore extract option */
                if (opt & CPIO_OPT_EXTRACT) {
                        opt &= ~CPIO_OPT_EXTRACT;
                }
@@ -79,7 +78,7 @@ extern int cpio_main(int argc, char **argv)
                        archive_handle->action_header = header_list;
                }
        }
-       if (cpio_filename) {    /* CPIO_OPT_FILE */
+       if (cpio_filename) { /* CPIO_OPT_FILE */
                archive_handle->src_fd = bb_xopen(cpio_filename, O_RDONLY);
                archive_handle->seek = seek_by_jump;
        }
index 6c665e5..1e8bd8a 100644 (file)
@@ -18,7 +18,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <getopt.h>
 
 #include "unarchive.h"
 #include "busybox.h"
index beb7bd1..a4db7ca 100644 (file)
@@ -63,7 +63,6 @@ static char *license_msg[] = {
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <getopt.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index e8f113b..fa48c6f 100644 (file)
@@ -16,7 +16,6 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>
-#include <getopt.h>
 #include "unarchive.h"
 #include "busybox.h"
 
index 48b4e2c..3bd8709 100644 (file)
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <getopt.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index d60cb4d..50d1486 100644 (file)
@@ -38,7 +38,6 @@
  */
 
 #include <fcntl.h>
-#include <getopt.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 5806f21..6b4989d 100644 (file)
@@ -24,7 +24,7 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <stdio.h>
-#include <getopt.h>
+#include <getopt.h> /* struct option */
 
 #include "busybox.h"
 
index f65754e..f9c72ca 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <getopt.h>
 #include <unistd.h>
 #include <string.h>
 #include <limits.h>
index 0488b2d..9583a00 100644 (file)
@@ -29,7 +29,6 @@
 #include <time.h>
 #include <stdio.h>
 #include <string.h>
-#include <getopt.h>
 #include "busybox.h"
 
 
index 3488f33..0c419ac 100644 (file)
@@ -28,7 +28,6 @@
  */
 
 #include <string.h>
-#include <getopt.h>
 #include <unistd.h>
 #include <stdint.h>
 #include <fcntl.h>
index 70cef65..1a8ad7c 100644 (file)
@@ -47,7 +47,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
-#include <getopt.h>
+#include <getopt.h> /* struct option */
 #include "busybox.h"
 
 
index e22dda6..74e1d9a 100644 (file)
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <errno.h>
-#include <getopt.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <getopt.h> /* struct option */
 
 #include "busybox.h"
 #include "libcoreutils/coreutils.h"
index ac2557a..4dfa9f5 100644 (file)
@@ -60,7 +60,7 @@ enum {
 #include <fcntl.h>
 #include <signal.h>
 #include <termios.h>
-#include <getopt.h>
+#include <getopt.h> /* struct option */
 #include <sys/ioctl.h>
 #include <sys/sysmacros.h>     /* major() and minor() */
 #include "busybox.h"
index 50364f1..e24ef4f 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <stdlib.h>
 #include <unistd.h>
-#include <getopt.h>
+#include <getopt.h> /* struct option */
 #include "busybox.h"
 
 static const struct option mkdir_long_options[] = {
index 43a8e6d..aef1ed1 100644 (file)
@@ -31,7 +31,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <stdlib.h>
-#include <getopt.h>
+#include <getopt.h> /* struct option */
 #include "busybox.h"
 #include "libcoreutils/coreutils.h"
 
index 4afe249..138cc9e 100644 (file)
@@ -30,7 +30,7 @@
 #include <grp.h>
 #include <sys/vfs.h>
 #include <time.h>
-#include <getopt.h>
+#include <getopt.h> /* optind */
 #include <sys/stat.h>
 #include <sys/statfs.h>
 #include <sys/statvfs.h>
index 3b4941d..0a9c973 100644 (file)
@@ -18,7 +18,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <getopt.h>
 
 #include "busybox.h"
 
index 57d4e83..6167c9f 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <stdio.h>
 #include <errno.h>
-#include <getopt.h>
+#include <getopt.h> /* optind */
 #include <string.h>
 #include <stdlib.h>
 
index 42f629f..2660f4a 100644 (file)
@@ -19,7 +19,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
-#include <getopt.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index 90927bb..dd56120 100644 (file)
@@ -43,8 +43,6 @@ int readlink_main(int argc, char **argv)
        RESERVE_CONFIG_BUFFER(resolved_path, PATH_MAX);
 #endif
 
-       /* no options, no getopt */
-
        if (optind + 1 != argc)
                bb_show_usage();
 
@@ -58,9 +56,8 @@ int readlink_main(int argc, char **argv)
        if (!buf)
                return EXIT_FAILURE;
        puts(buf);
-#ifdef CONFIG_FEATURE_CLEAN_UP
-       free(buf);
-#endif
+
+       if (ENABLE_FEATURE_CLEAN_UP) free(buf);
 
        return EXIT_SUCCESS;
 }
index 4fce80d..b1ebe2f 100644 (file)
@@ -16,7 +16,7 @@
 #include <sys/stat.h>
 #include <dirent.h>
 #include <unistd.h>
-#include <getopt.h>
+#include <getopt.h> /* struct option */
 
 #include "busybox.h"
 #include "pwd_.h"