Skip to content

Commit

Permalink
delete tons of extra #includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Vlasenko committed May 31, 2007
1 parent fad2b86 commit 9a7d38f
Show file tree
Hide file tree
Showing 59 changed files with 68 additions and 176 deletions.
20 changes: 8 additions & 12 deletions archival/cpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@
* Only supports new ASCII and CRC formats
*
*/
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "unarchive.h"
#include "libbb.h"
#include "unarchive.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_CREATE_LEADING_DIR 0x20
#define CPIO_OPT_PRESERVE_MTIME 0x40
#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

int cpio_main(int argc, char **argv);
int cpio_main(int argc, char **argv)
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/archive_xread_all_eof.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include "unarchive.h"
#include "libbb.h"
#include "unarchive.h"

ssize_t archive_xread_all_eof(archive_handle_t *archive_handle,
unsigned char *buf, size_t count)
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/data_align.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <sys/types.h>
//#include <sys/types.h>

#include "libbb.h"
#include "unarchive.h"
Expand Down
1 change: 1 addition & 0 deletions archival/libunarchive/data_extract_to_stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include "libbb.h"
#include "unarchive.h"

void data_extract_to_stdout(archive_handle_t *archive_handle)
Expand Down
3 changes: 0 additions & 3 deletions archival/libunarchive/decompress_uncompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
* [... History snipped ...]
*
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>

/* Default input buffer size */
#define IBUFSIZ 2048
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/filter_accept_all.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <stdlib.h>
#include "libbb.h"
#include "unarchive.h"

/* Accept any non-null name, its not really a filter at all */
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/filter_accept_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <stdlib.h>
#include "libbb.h"
#include "unarchive.h"

/*
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/filter_accept_reject_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <stdlib.h>
#include "libbb.h"
#include "unarchive.h"

/*
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/find_list_entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#include <fnmatch.h>
#include <stdlib.h>
#include "libbb.h"
#include "unarchive.h"

/* Find a string in a shell pattern list */
Expand Down
1 change: 1 addition & 0 deletions archival/libunarchive/get_header_tar_lzma.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Licensed under GPL v2, see file LICENSE in this tarball for details.
*/

#include "libbb.h"
#include "unarchive.h"

char get_header_tar_lzma(archive_handle_t * archive_handle)
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/header_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
#include <stdio.h>
#include "libbb.h"
#include "unarchive.h"

void header_list(const file_header_t *file_header)
Expand Down
2 changes: 1 addition & 1 deletion archival/libunarchive/header_skip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
#include <stdio.h>
#include "libbb.h"
#include "unarchive.h"

void header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED)
Expand Down
4 changes: 0 additions & 4 deletions archival/libunarchive/open_transformer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <stdlib.h>
#include <unistd.h>

#include "libbb.h"

#include "unarchive.h"

/* transformer(), more than meets the eye */
Expand Down
4 changes: 1 addition & 3 deletions archival/libunarchive/seek_by_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <stdlib.h>

#include "unarchive.h"
#include "libbb.h"
#include "unarchive.h"

/* If we are reading through a pipe(), or from stdin then we can't lseek,
* we must read and discard the data to skip over it.
Expand Down
6 changes: 2 additions & 4 deletions archival/libunarchive/unpack_ar_archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
/*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include "unarchive.h"

#include "libbb.h"
#include "unarchive.h"

void unpack_ar_archive(archive_handle_t *ar_archive)
{
Expand Down
3 changes: 0 additions & 3 deletions console-tools/clear.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@

/* no options, no getopt */

#include <stdio.h>
#include <stdlib.h>
#include "libbb.h"


int clear_main(int argc, char **argv);
int clear_main(int argc, char **argv)
{
Expand Down
3 changes: 0 additions & 3 deletions console-tools/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

/* no options, no getopt */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "libbb.h"

int reset_main(int argc, char **argv);
Expand Down
3 changes: 1 addition & 2 deletions console-tools/setkeycodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <sys/ioctl.h>
//#include <sys/ioctl.h>
#include "libbb.h"


/* From <linux/kd.h> */
struct kbkeycode {
unsigned int scancode, keycode;
Expand Down
4 changes: 0 additions & 4 deletions coreutils/df.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
* the command line. Properly round *-blocks, Used, and Available quantities.
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <mntent.h>
#include <sys/vfs.h>
#include "libbb.h"
Expand Down
3 changes: 0 additions & 3 deletions coreutils/id.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
*/

#include "libbb.h"
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

#define PRINT_REAL 1
#define NAME_NOT_NUMBER 2
Expand Down
5 changes: 1 addition & 4 deletions coreutils/libcoreutils/getopt_mk_fifo_nod.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
*
*/

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "libbb.h"
#include "coreutils.h"
//#include "coreutils.h"

mode_t getopt_mk_fifo_nod(int argc, char **argv)
{
Expand Down
3 changes: 0 additions & 3 deletions coreutils/printenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "libbb.h"
extern char **environ;

Expand Down
6 changes: 0 additions & 6 deletions coreutils/uname.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@
* Now does proper error checking on i/o. Plus some further space savings.
*/

#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include "libbb.h"

Expand Down
4 changes: 0 additions & 4 deletions debianutils/pipe_progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
*/

#include "libbb.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>

#define PIPE_PROGRESS_SIZE 4096

Expand Down
2 changes: 1 addition & 1 deletion include/unarchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define ARCHIVE_NOPRESERVE_OWN 32
#define ARCHIVE_NOPRESERVE_PERM 64

#include "libbb.h"
//#include "libbb.h"

typedef struct file_headers_s {
char *name;
Expand Down
6 changes: 3 additions & 3 deletions init/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

#include "libbb.h"
#include <paths.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
//#include <signal.h>
//#include <sys/ioctl.h>
//#include <sys/wait.h>
#include <sys/reboot.h>

#if ENABLE_FEATURE_INIT_SYSLOG
Expand Down
2 changes: 0 additions & 2 deletions libbb/ask_confirmation.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
* return 1. Otherwise return 0.
*/

#include <stdio.h>
#include <ctype.h>
#include "libbb.h"

int bb_ask_confirmation(void)
Expand Down
7 changes: 1 addition & 6 deletions libbb/bb_askpass.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <termios.h>
#include <sys/ioctl.h>
//#include <sys/ioctl.h>

#include "libbb.h"

Expand Down
2 changes: 0 additions & 2 deletions libbb/bb_do_delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* Licensed under the GPL v2, see the file LICENSE in this tarball.
*/

#include <time.h>
#include <unistd.h>
#include "libbb.h"

void bb_do_delay(int seconds)
Expand Down
2 changes: 1 addition & 1 deletion libbb/get_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <sys/ioctl.h>
//#include <sys/ioctl.h>
#include "libbb.h"


Expand Down
3 changes: 0 additions & 3 deletions libbb/herror_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <stdarg.h>
#include <stdlib.h>

#include "libbb.h"

void bb_herror_msg(const char *s, ...)
Expand Down
1 change: 0 additions & 1 deletion libbb/human_readable.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
* and "#if 0"'d below.
*/

#include <stdio.h>
#include "libbb.h"

const char *make_human_readable_str(unsigned long long size,
Expand Down
3 changes: 0 additions & 3 deletions libbb/inode_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libbb.h"

typedef struct ino_dev_hash_bucket_struct {
Expand Down
2 changes: 1 addition & 1 deletion libbb/lineedit.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- not true viewing if length prompt less terminal width
*/

#include <sys/ioctl.h>
//#include <sys/ioctl.h>
#include "libbb.h"


Expand Down
1 change: 0 additions & 1 deletion libbb/llist.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*/

#include <stdlib.h>
#include "libbb.h"

/* Add data to the start of the linked list. */
Expand Down
6 changes: 1 addition & 5 deletions libbb/login.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@
*/

#include <sys/param.h> /* MAXHOSTNAMELEN */
#include <stdio.h>
#include <unistd.h>
#include "libbb.h"

#include <sys/utsname.h>
#include <time.h>
#include "libbb.h"

#define LOGIN " login: "

Expand Down
Loading

0 comments on commit 9a7d38f

Please sign in to comment.