From febe3c421109032cdfb36249c54e314d39256ace Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 4 Apr 2007 20:52:03 +0000 Subject: [PATCH] - sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g" --- applets/individual.c | 2 +- archival/libunarchive/decompress_bunzip2.c | 2 +- console-tools/deallocvt.c | 4 ++-- coreutils/dos2unix.c | 4 ++-- e2fsprogs/fsck.c | 6 +++--- e2fsprogs/old_e2fsprogs/e2fsck.c | 6 +++--- e2fsprogs/old_e2fsprogs/fsck.c | 6 +++--- e2fsprogs/old_e2fsprogs/mke2fs.c | 6 +++--- findutils/grep.c | 2 +- init/halt.c | 4 ++-- init/mesg.c | 4 ++-- miscutils/nmeter.c | 4 ++-- miscutils/runlevel.c | 4 ++-- miscutils/setsid.c | 4 ++-- networking/ether-wake.c | 4 ++-- networking/httpd.c | 4 ++-- networking/inetd.c | 4 ++-- networking/traceroute.c | 4 ++-- networking/udhcp/dhcpc.c | 4 ++-- networking/udhcp/dhcpd.c | 4 ++-- networking/udhcp/dumpleases.c | 4 ++-- networking/zcip.c | 4 ++-- scripts/basic/docproc.c | 2 +- scripts/basic/fixdep.c | 2 +- selinux/chcon.c | 4 ++-- selinux/load_policy.c | 4 ++-- selinux/runcon.c | 4 ++-- shell/bbsh.c | 4 ++-- util-linux/dmesg.c | 4 ++-- util-linux/getopt.c | 8 ++++---- util-linux/mdev.c | 4 ++-- util-linux/mkswap.c | 4 ++-- util-linux/switch_root.c | 4 ++-- 33 files changed, 67 insertions(+), 67 deletions(-) diff --git a/applets/individual.c b/applets/individual.c index 1667f188b..0c7a4b73e 100644 --- a/applets/individual.c +++ b/applets/individual.c @@ -11,7 +11,7 @@ const char *applet_name; #include #include "usage.h" -int main(int argc, char *argv[]) +int main(int argc, char **argv) { applet_name = argv[0]; diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c index ff7d64d83..dd2e1ddcb 100644 --- a/archival/libunarchive/decompress_bunzip2.c +++ b/archival/libunarchive/decompress_bunzip2.c @@ -719,7 +719,7 @@ static char * const bunzip_errors[]={NULL,"Bad file checksum","Not bzip data", "Out of memory","Obsolete (pre 0.9.5) bzip format not supported."}; /* Dumb little test thing, decompress stdin to stdout */ -int main(int argc, char *argv[]) +int main(int argc, char **argv) { int i=uncompressStream(0,1); char c; diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index 81ea68ebb..476eefa51 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -15,8 +15,8 @@ /* From */ enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ -int deallocvt_main(int argc, char *argv[]); -int deallocvt_main(int argc, char *argv[]) +int deallocvt_main(int argc, char **argv); +int deallocvt_main(int argc, char **argv) { /* num = 0 deallocate all unused consoles */ int num = 0; diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c index 62c1361b2..1d35d524a 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c @@ -82,8 +82,8 @@ static int convert(char *fn) return 0; } -int dos2unix_main(int argc, char *argv[]); -int dos2unix_main(int argc, char *argv[]) +int dos2unix_main(int argc, char **argv); +int dos2unix_main(int argc, char **argv) { int o; diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index b70fd7088..cf7f6f070 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c @@ -1032,7 +1032,7 @@ static void compile_fs_type(char *fs_type) } } -static void parse_args(int argc, char *argv[]) +static void parse_args(int argc, char **argv) { int i, j; char *arg, *tmp; @@ -1158,8 +1158,8 @@ static void signal_cancel(int sig ATTRIBUTE_UNUSED) cancel_requested = 1; } -int fsck_main(int argc, char *argv[]); -int fsck_main(int argc, char *argv[]) +int fsck_main(int argc, char **argv); +int fsck_main(int argc, char **argv) { int i, status = 0; int interactive; diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c index a0f691606..bb9f42a4b 100644 --- a/e2fsprogs/old_e2fsprogs/e2fsck.c +++ b/e2fsprogs/old_e2fsprogs/e2fsck.c @@ -13001,7 +13001,7 @@ static void parse_extended_opts(e2fsck_t ctx, const char *opts) } -static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) +static errcode_t PRS(int argc, char **argv, e2fsck_t *ret_ctx) { int flush = 0; int c, fd; @@ -13202,8 +13202,8 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) static const char my_ver_string[] = E2FSPROGS_VERSION; static const char my_ver_date[] = E2FSPROGS_DATE; -int e2fsck_main (int argc, char *argv[]); -int e2fsck_main (int argc, char *argv[]) +int e2fsck_main (int argc, char **argv); +int e2fsck_main (int argc, char **argv) { errcode_t retval; int exit_value = EXIT_OK; diff --git a/e2fsprogs/old_e2fsprogs/fsck.c b/e2fsprogs/old_e2fsprogs/fsck.c index 6e8a63742..7b794c3aa 100644 --- a/e2fsprogs/old_e2fsprogs/fsck.c +++ b/e2fsprogs/old_e2fsprogs/fsck.c @@ -1171,7 +1171,7 @@ static void signal_cancel(int sig FSCK_ATTR((unused))) cancel_requested++; } -static void PRS(int argc, char *argv[]) +static void PRS(int argc, char **argv) { int i, j; char *arg, *dev, *tmp = 0; @@ -1321,8 +1321,8 @@ static void PRS(int argc, char *argv[]) max_running = atoi(tmp); } -int fsck_main(int argc, char *argv[]); -int fsck_main(int argc, char *argv[]) +int fsck_main(int argc, char **argv); +int fsck_main(int argc, char **argv) { int i, status = 0; int interactive = 0; diff --git a/e2fsprogs/old_e2fsprogs/mke2fs.c b/e2fsprogs/old_e2fsprogs/mke2fs.c index 6cdb16cae..4d5cce307 100644 --- a/e2fsprogs/old_e2fsprogs/mke2fs.c +++ b/e2fsprogs/old_e2fsprogs/mke2fs.c @@ -787,7 +787,7 @@ static __u32 ok_features[3] = { EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER /* R/O compat */ }; -static int PRS(int argc, char *argv[]) +static int PRS(int argc, char **argv) { int c; int size; @@ -1175,8 +1175,8 @@ static void mke2fs_clean_up(void) if (ENABLE_FEATURE_CLEAN_UP && journal_device) free(journal_device); } -int mke2fs_main (int argc, char *argv[]); -int mke2fs_main (int argc, char *argv[]) +int mke2fs_main (int argc, char **argv); +int mke2fs_main (int argc, char **argv) { errcode_t retval; ext2_filsys fs; diff --git a/findutils/grep.c b/findutils/grep.c index 43810ea84..370b753d7 100644 --- a/findutils/grep.c +++ b/findutils/grep.c @@ -396,7 +396,7 @@ int grep_main(int argc, char **argv) invert_search = ((option_mask32 & OPT_v) != 0); /* 0 | 1 */ if (pattern_head != NULL) { - /* convert char *argv[] to grep_list_data_t */ + /* convert char **argv to grep_list_data_t */ llist_t *cur; for (cur = pattern_head; cur; cur = cur->link) diff --git a/init/halt.c b/init/halt.c index d5c22a8ac..8faf9d8c3 100644 --- a/init/halt.c +++ b/init/halt.c @@ -10,8 +10,8 @@ #include "busybox.h" #include -int halt_main(int argc, char *argv[]); -int halt_main(int argc, char *argv[]) +int halt_main(int argc, char **argv); +int halt_main(int argc, char **argv) { static const int magic[] = { #ifdef RB_HALT_SYSTEM diff --git a/init/mesg.c b/init/mesg.c index 40d8ae3ca..77bfe0e21 100644 --- a/init/mesg.c +++ b/init/mesg.c @@ -15,8 +15,8 @@ #define S_IWGRP_OR_S_IWOTH (S_IWGRP | S_IWOTH) #endif -int mesg_main(int argc, char *argv[]); -int mesg_main(int argc, char *argv[]) +int mesg_main(int argc, char **argv); +int mesg_main(int argc, char **argv) { struct stat sb; const char *tty; diff --git a/miscutils/nmeter.c b/miscutils/nmeter.c index 0b499034e..c96ce5da5 100644 --- a/miscutils/nmeter.c +++ b/miscutils/nmeter.c @@ -729,8 +729,8 @@ static init_func* init_functions[] = { init_cr, }; -int nmeter_main(int argc, char* argv[]); -int nmeter_main(int argc, char* argv[]) +int nmeter_main(int argc, char **argv); +int nmeter_main(int argc, char **argv) { char buf[32]; s_stat *first = NULL; diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index 23714f7c7..df2da2b1f 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c @@ -18,8 +18,8 @@ #include #include -int runlevel_main(int argc, char *argv[]); -int runlevel_main(int argc, char *argv[]) +int runlevel_main(int argc, char **argv); +int runlevel_main(int argc, char **argv) { struct utmp *ut; char prev; diff --git a/miscutils/setsid.c b/miscutils/setsid.c index c878f524b..1abb54530 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c @@ -16,8 +16,8 @@ #include "busybox.h" -int setsid_main(int argc, char *argv[]); -int setsid_main(int argc, char *argv[]) +int setsid_main(int argc, char **argv); +int setsid_main(int argc, char **argv) { if (argc < 2) bb_show_usage(); diff --git a/networking/ether-wake.c b/networking/ether-wake.c index 73f693e7f..e971ba39c 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c @@ -105,8 +105,8 @@ static inline void get_dest_addr(const char *arg, struct ether_addr *eaddr); static inline int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast); static inline int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd); -int ether_wake_main(int argc, char *argv[]); -int ether_wake_main(int argc, char *argv[]) +int ether_wake_main(int argc, char **argv); +int ether_wake_main(int argc, char **argv) { const char *ifname = "eth0"; char *pass = NULL; diff --git a/networking/httpd.c b/networking/httpd.c index 8ab2bc45d..7ee62c32a 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1939,8 +1939,8 @@ enum { }; -int httpd_main(int argc, char *argv[]); -int httpd_main(int argc, char *argv[]) +int httpd_main(int argc, char **argv); +int httpd_main(int argc, char **argv) { unsigned opt; const char *home_httpd = home; diff --git a/networking/inetd.c b/networking/inetd.c index fd72aa726..0ba3b949a 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -1248,8 +1248,8 @@ inetd_setproctitle(char *a, int s) #endif -int inetd_main(int argc, char *argv[]); -int inetd_main(int argc, char *argv[]) +int inetd_main(int argc, char **argv); +int inetd_main(int argc, char **argv) { servtab_t *sep; struct passwd *pwd; diff --git a/networking/traceroute.c b/networking/traceroute.c index 552903655..33023e74f 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -915,8 +915,8 @@ getaddr(uint32_t *ap, const char *host) #endif -int traceroute_main(int argc, char *argv[]); -int traceroute_main(int argc, char *argv[]) +int traceroute_main(int argc, char **argv); +int traceroute_main(int argc, char **argv) { int code, n; unsigned char *outp; diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index dc10386d5..e8cdd79df 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c @@ -132,8 +132,8 @@ static uint8_t* alloc_dhcp_option(int code, const char *str, int extra) } -int udhcpc_main(int argc, char *argv[]); -int udhcpc_main(int argc, char *argv[]) +int udhcpc_main(int argc, char **argv); +int udhcpc_main(int argc, char **argv) { uint8_t *temp, *message; char *str_c, *str_V, *str_h, *str_F, *str_r, *str_T, *str_t; diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index ef9aa584e..d85615349 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c @@ -21,8 +21,8 @@ struct dhcpOfferedAddr *leases; struct server_config_t server_config; -int udhcpd_main(int argc, char *argv[]); -int udhcpd_main(int argc, char *argv[]) +int udhcpd_main(int argc, char **argv); +int udhcpd_main(int argc, char **argv) { fd_set rfds; struct timeval tv; diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index 507663fd9..01c7c27e8 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c @@ -7,8 +7,8 @@ #include "common.h" #include "dhcpd.h" -int dumpleases_main(int argc, char *argv[]); -int dumpleases_main(int argc, char *argv[]) +int dumpleases_main(int argc, char **argv); +int dumpleases_main(int argc, char **argv) { int fd; int i; diff --git a/networking/zcip.c b/networking/zcip.c index 6035b91e1..552833f9f 100644 --- a/networking/zcip.c +++ b/networking/zcip.c @@ -159,8 +159,8 @@ static unsigned ATTRIBUTE_ALWAYS_INLINE ms_rdelay(unsigned secs) /** * main program */ -int zcip_main(int argc, char *argv[]); -int zcip_main(int argc, char *argv[]) +int zcip_main(int argc, char **argv); +int zcip_main(int argc, char **argv) { int state = PROBE; struct ether_addr eth_addr; diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index cb02baa63..d9db84ac5 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c @@ -331,7 +331,7 @@ void parse_file(FILE *infile) } -int main(int argc, char *argv[]) +int main(int argc, char **argv) { FILE * infile; if (argc != 3) { diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index a96239d38..811d48b78 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -386,7 +386,7 @@ void traps(void) */ } -int main(int argc, char *argv[]) +int main(int argc, char **argv) { traps(); diff --git a/selinux/chcon.c b/selinux/chcon.c index 0eab6864e..437502c90 100644 --- a/selinux/chcon.c +++ b/selinux/chcon.c @@ -120,8 +120,8 @@ static struct option chcon_options[] = { }; #endif -int chcon_main(int argc, char *argv[]); -int chcon_main(int argc, char *argv[]) +int chcon_main(int argc, char **argv); +int chcon_main(int argc, char **argv) { char *reference_file; char *fname; diff --git a/selinux/load_policy.c b/selinux/load_policy.c index 83051e697..5d5d7d5a8 100644 --- a/selinux/load_policy.c +++ b/selinux/load_policy.c @@ -5,8 +5,8 @@ */ #include "busybox.h" -int load_policy_main(int argc, char *argv[]); -int load_policy_main(int argc, char *argv[]) +int load_policy_main(int argc, char **argv); +int load_policy_main(int argc, char **argv) { int fd; struct stat st; diff --git a/selinux/runcon.c b/selinux/runcon.c index 8888ccc7b..a3543878c 100644 --- a/selinux/runcon.c +++ b/selinux/runcon.c @@ -87,8 +87,8 @@ static const struct option runcon_options[] = { #define OPTS_HELP (1<<5) /* h */ #define OPTS_CONTEXT_COMPONENT (OPTS_ROLE | OPTS_TYPE | OPTS_USER | OPTS_RANGE) -int runcon_main(int argc, char *argv[]); -int runcon_main(int argc, char *argv[]) +int runcon_main(int argc, char **argv); +int runcon_main(int argc, char **argv) { char *role = NULL; char *range = NULL; diff --git a/shell/bbsh.c b/shell/bbsh.c index fe27f4418..4f38213c9 100644 --- a/shell/bbsh.c +++ b/shell/bbsh.c @@ -198,8 +198,8 @@ static void handle(char *command) } } -int bbsh_main(int argc, char *argv[]); -int bbsh_main(int argc, char *argv[]) +int bbsh_main(int argc, char **argv); +int bbsh_main(int argc, char **argv) { char *command=NULL; FILE *f; diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 0bbc306fc..820b837c9 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -13,8 +13,8 @@ #include #include -int dmesg_main(int argc, char *argv[]); -int dmesg_main(int argc, char *argv[]) +int dmesg_main(int argc, char **argv); +int dmesg_main(int argc, char **argv) { char *size, *level; int flags = getopt32(argc, argv, "cs:n:", &size, &level); diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 4861990dd..74e7235ea 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c @@ -55,7 +55,7 @@ static int alternative; /* 0 is getopt_long, 1 is getopt_long_only */ /* Function prototypes */ static const char *normalize(const char *arg); -static int generate_output(char * argv[],int argc,const char *optstr, +static int generate_output(char **argv,int argc,const char *optstr, const struct option *longopts); static void add_long_options(char *options); static void add_longopt(const char *name,int has_arg); @@ -133,7 +133,7 @@ const char *normalize(const char *arg) * optstr must contain the short options, and longopts the long options. * Other settings are found in global variables. */ -int generate_output(char * argv[],int argc,const char *optstr, +int generate_output(char **argv,int argc,const char *optstr, const struct option *longopts) { int exit_code = 0; /* We assume everything will be OK */ @@ -288,8 +288,8 @@ static const struct option longopts[]= static const char shortopts[]="+ao:l:n:qQs:Tu"; -int getopt_main(int argc, char *argv[]); -int getopt_main(int argc, char *argv[]) +int getopt_main(int argc, char **argv); +int getopt_main(int argc, char **argv) { const char *optstr = NULL; char *name = NULL; diff --git a/util-linux/mdev.c b/util-linux/mdev.c index f9f067dfe..6ff49fc01 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -230,8 +230,8 @@ static void find_dev(char *path) closedir(dir); } -int mdev_main(int argc, char *argv[]); -int mdev_main(int argc, char *argv[]) +int mdev_main(int argc, char **argv); +int mdev_main(int argc, char **argv) { char *action; char *env_path; diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index ac894d50a..a84792c66 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c @@ -8,8 +8,8 @@ #include "busybox.h" -int mkswap_main(int argc, char *argv[]); -int mkswap_main(int argc, char *argv[]) +int mkswap_main(int argc, char **argv); +int mkswap_main(int argc, char **argv) { int fd, pagesize; off_t len; diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index 5a01fd6f7..43c2a6991 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c @@ -63,8 +63,8 @@ static void delete_contents(const char *directory) } else unlink(directory); } -int switch_root_main(int argc, char *argv[]); -int switch_root_main(int argc, char *argv[]) +int switch_root_main(int argc, char **argv); +int switch_root_main(int argc, char **argv) { char *newroot, *console=NULL; struct stat st1, st2; -- 2.25.1