aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-07-05 09:18:54 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-07-05 09:18:54 +0000
commita60f84ebf07863e390b72a2b6150e461a1ec18e9 (patch)
treef59bc665cfe3d2d32622450d80523e3c1265e501 /shell/ash.c
parentf6efccc0659a2e2978f2021153f34ce92257ad2b (diff)
downloadbusybox-w32-a60f84ebf07863e390b72a2b6150e461a1ec18e9.tar.gz
busybox-w32-a60f84ebf07863e390b72a2b6150e461a1ec18e9.tar.bz2
busybox-w32-a60f84ebf07863e390b72a2b6150e461a1ec18e9.zip
*: rename ATTRIBUTE_XXX to just XXX.
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 58bfc5278..77fe91a24 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -261,7 +261,7 @@ extern struct globals_misc *const ash_ptr_to_globals_misc;
261 * just do a longjmp to the exception handler. The type of exception is 261 * just do a longjmp to the exception handler. The type of exception is
262 * stored in the global variable "exception". 262 * stored in the global variable "exception".
263 */ 263 */
264static void raise_exception(int) ATTRIBUTE_NORETURN; 264static void raise_exception(int) NORETURN;
265static void 265static void
266raise_exception(int e) 266raise_exception(int e)
267{ 267{
@@ -281,7 +281,7 @@ raise_exception(int e)
281 * are held using the INT_OFF macro. (The test for iflag is just 281 * are held using the INT_OFF macro. (The test for iflag is just
282 * defensive programming.) 282 * defensive programming.)
283 */ 283 */
284static void raise_interrupt(void) ATTRIBUTE_NORETURN; 284static void raise_interrupt(void) NORETURN;
285static void 285static void
286raise_interrupt(void) 286raise_interrupt(void)
287{ 287{
@@ -1048,7 +1048,7 @@ ash_vmsg(const char *msg, va_list ap)
1048 * is not NULL then error prints an error message using printf style 1048 * is not NULL then error prints an error message using printf style
1049 * formatting. It then raises the error exception. 1049 * formatting. It then raises the error exception.
1050 */ 1050 */
1051static void ash_vmsg_and_raise(int, const char *, va_list) ATTRIBUTE_NORETURN; 1051static void ash_vmsg_and_raise(int, const char *, va_list) NORETURN;
1052static void 1052static void
1053ash_vmsg_and_raise(int cond, const char *msg, va_list ap) 1053ash_vmsg_and_raise(int cond, const char *msg, va_list ap)
1054{ 1054{
@@ -1068,7 +1068,7 @@ ash_vmsg_and_raise(int cond, const char *msg, va_list ap)
1068 /* NOTREACHED */ 1068 /* NOTREACHED */
1069} 1069}
1070 1070
1071static void ash_msg_and_raise_error(const char *, ...) ATTRIBUTE_NORETURN; 1071static void ash_msg_and_raise_error(const char *, ...) NORETURN;
1072static void 1072static void
1073ash_msg_and_raise_error(const char *msg, ...) 1073ash_msg_and_raise_error(const char *msg, ...)
1074{ 1074{
@@ -1080,7 +1080,7 @@ ash_msg_and_raise_error(const char *msg, ...)
1080 va_end(ap); 1080 va_end(ap);
1081} 1081}
1082 1082
1083static void ash_msg_and_raise(int, const char *, ...) ATTRIBUTE_NORETURN; 1083static void ash_msg_and_raise(int, const char *, ...) NORETURN;
1084static void 1084static void
1085ash_msg_and_raise(int cond, const char *msg, ...) 1085ash_msg_and_raise(int cond, const char *msg, ...)
1086{ 1086{
@@ -2462,7 +2462,7 @@ docd(const char *dest, int flags)
2462} 2462}
2463 2463
2464static int 2464static int
2465cdcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 2465cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
2466{ 2466{
2467 const char *dest; 2467 const char *dest;
2468 const char *path; 2468 const char *path;
@@ -2526,7 +2526,7 @@ cdcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
2526} 2526}
2527 2527
2528static int 2528static int
2529pwdcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 2529pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
2530{ 2530{
2531 int flags; 2531 int flags;
2532 const char *dir = curdir; 2532 const char *dir = curdir;
@@ -3128,7 +3128,7 @@ printalias(const struct alias *ap)
3128 * TODO - sort output 3128 * TODO - sort output
3129 */ 3129 */
3130static int 3130static int
3131aliascmd(int argc ATTRIBUTE_UNUSED, char **argv) 3131aliascmd(int argc UNUSED_PARAM, char **argv)
3132{ 3132{
3133 char *n, *v; 3133 char *n, *v;
3134 int ret = 0; 3134 int ret = 0;
@@ -3163,7 +3163,7 @@ aliascmd(int argc ATTRIBUTE_UNUSED, char **argv)
3163} 3163}
3164 3164
3165static int 3165static int
3166unaliascmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 3166unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
3167{ 3167{
3168 int i; 3168 int i;
3169 3169
@@ -3670,7 +3670,7 @@ restartjob(struct job *jp, int mode)
3670} 3670}
3671 3671
3672static int 3672static int
3673fg_bgcmd(int argc ATTRIBUTE_UNUSED, char **argv) 3673fg_bgcmd(int argc UNUSED_PARAM, char **argv)
3674{ 3674{
3675 struct job *jp; 3675 struct job *jp;
3676 FILE *out; 3676 FILE *out;
@@ -3957,7 +3957,7 @@ showjobs(FILE *out, int mode)
3957} 3957}
3958 3958
3959static int 3959static int
3960jobscmd(int argc ATTRIBUTE_UNUSED, char **argv) 3960jobscmd(int argc UNUSED_PARAM, char **argv)
3961{ 3961{
3962 int mode, m; 3962 int mode, m;
3963 3963
@@ -4010,7 +4010,7 @@ getstatus(struct job *job)
4010} 4010}
4011 4011
4012static int 4012static int
4013waitcmd(int argc ATTRIBUTE_UNUSED, char **argv) 4013waitcmd(int argc UNUSED_PARAM, char **argv)
4014{ 4014{
4015 struct job *job; 4015 struct job *job;
4016 int retval; 4016 int retval;
@@ -5681,7 +5681,7 @@ argstr(char *p, int flag, struct strlist *var_str_list)
5681} 5681}
5682 5682
5683static char * 5683static char *
5684scanleft(char *startp, char *rmesc, char *rmescend ATTRIBUTE_UNUSED, char *str, int quotes, 5684scanleft(char *startp, char *rmesc, char *rmescend UNUSED_PARAM, char *str, int quotes,
5685 int zero) 5685 int zero)
5686{ 5686{
5687// This commented out code was added by James Simmons <jsimmons@infradead.org> 5687// This commented out code was added by James Simmons <jsimmons@infradead.org>
@@ -5785,7 +5785,7 @@ scanright(char *startp, char *rmesc, char *rmescend, char *str, int quotes,
5785 return 0; 5785 return 0;
5786} 5786}
5787 5787
5788static void varunset(const char *, const char *, const char *, int) ATTRIBUTE_NORETURN; 5788static void varunset(const char *, const char *, const char *, int) NORETURN;
5789static void 5789static void
5790varunset(const char *end, const char *var, const char *umsg, int varflags) 5790varunset(const char *end, const char *var, const char *umsg, int varflags)
5791{ 5791{
@@ -6906,7 +6906,7 @@ tryexec(USE_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char *
6906 * Exec a program. Never returns. If you change this routine, you may 6906 * Exec a program. Never returns. If you change this routine, you may
6907 * have to change the find_command routine as well. 6907 * have to change the find_command routine as well.
6908 */ 6908 */
6909static void shellexec(char **, const char *, int) ATTRIBUTE_NORETURN; 6909static void shellexec(char **, const char *, int) NORETURN;
6910static void 6910static void
6911shellexec(char **argv, const char *path, int idx) 6911shellexec(char **argv, const char *path, int idx)
6912{ 6912{
@@ -7083,7 +7083,7 @@ addcmdentry(char *name, struct cmdentry *entry)
7083} 7083}
7084 7084
7085static int 7085static int
7086hashcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 7086hashcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
7087{ 7087{
7088 struct tblentry **pp; 7088 struct tblentry **pp;
7089 struct tblentry *cmdp; 7089 struct tblentry *cmdp;
@@ -7385,7 +7385,7 @@ describe_command(char *command, int describe_command_verbose)
7385} 7385}
7386 7386
7387static int 7387static int
7388typecmd(int argc ATTRIBUTE_UNUSED, char **argv) 7388typecmd(int argc UNUSED_PARAM, char **argv)
7389{ 7389{
7390 int i = 1; 7390 int i = 1;
7391 int err = 0; 7391 int err = 0;
@@ -7404,7 +7404,7 @@ typecmd(int argc ATTRIBUTE_UNUSED, char **argv)
7404 7404
7405#if ENABLE_ASH_CMDCMD 7405#if ENABLE_ASH_CMDCMD
7406static int 7406static int
7407commandcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 7407commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
7408{ 7408{
7409 int c; 7409 int c;
7410 enum { 7410 enum {
@@ -8341,7 +8341,7 @@ mklocal(char *name)
8341 * The "local" command. 8341 * The "local" command.
8342 */ 8342 */
8343static int 8343static int
8344localcmd(int argc ATTRIBUTE_UNUSED, char **argv) 8344localcmd(int argc UNUSED_PARAM, char **argv)
8345{ 8345{
8346 char *name; 8346 char *name;
8347 8347
@@ -8353,19 +8353,19 @@ localcmd(int argc ATTRIBUTE_UNUSED, char **argv)
8353} 8353}
8354 8354
8355static int 8355static int
8356falsecmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 8356falsecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
8357{ 8357{
8358 return 1; 8358 return 1;
8359} 8359}
8360 8360
8361static int 8361static int
8362truecmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 8362truecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
8363{ 8363{
8364 return 0; 8364 return 0;
8365} 8365}
8366 8366
8367static int 8367static int
8368execcmd(int argc ATTRIBUTE_UNUSED, char **argv) 8368execcmd(int argc UNUSED_PARAM, char **argv)
8369{ 8369{
8370 if (argv[1]) { 8370 if (argv[1]) {
8371 iflag = 0; /* exit on error */ 8371 iflag = 0; /* exit on error */
@@ -8380,7 +8380,7 @@ execcmd(int argc ATTRIBUTE_UNUSED, char **argv)
8380 * The return command. 8380 * The return command.
8381 */ 8381 */
8382static int 8382static int
8383returncmd(int argc ATTRIBUTE_UNUSED, char **argv) 8383returncmd(int argc UNUSED_PARAM, char **argv)
8384{ 8384{
8385 /* 8385 /*
8386 * If called outside a function, do what ksh does; 8386 * If called outside a function, do what ksh does;
@@ -8561,7 +8561,7 @@ isassignment(const char *p)
8561 return *q == '='; 8561 return *q == '=';
8562} 8562}
8563static int 8563static int
8564bltincmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 8564bltincmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
8565{ 8565{
8566 /* Preserve exitstatus of a previous possible redirection 8566 /* Preserve exitstatus of a previous possible redirection
8567 * as POSIX mandates */ 8567 * as POSIX mandates */
@@ -8874,7 +8874,7 @@ prehash(union node *n)
8874 * in the standard shell so we don't make it one here. 8874 * in the standard shell so we don't make it one here.
8875 */ 8875 */
8876static int 8876static int
8877breakcmd(int argc ATTRIBUTE_UNUSED, char **argv) 8877breakcmd(int argc UNUSED_PARAM, char **argv)
8878{ 8878{
8879 int n = argv[1] ? number(argv[1]) : 1; 8879 int n = argv[1] ? number(argv[1]) : 1;
8880 8880
@@ -9377,7 +9377,7 @@ chkmail(void)
9377} 9377}
9378 9378
9379static void 9379static void
9380changemail(const char *val ATTRIBUTE_UNUSED) 9380changemail(const char *val UNUSED_PARAM)
9381{ 9381{
9382 mail_var_path_changed = 1; 9382 mail_var_path_changed = 1;
9383} 9383}
@@ -9533,7 +9533,7 @@ options(int cmdline)
9533 * The shift builtin command. 9533 * The shift builtin command.
9534 */ 9534 */
9535static int 9535static int
9536shiftcmd(int argc ATTRIBUTE_UNUSED, char **argv) 9536shiftcmd(int argc UNUSED_PARAM, char **argv)
9537{ 9537{
9538 int n; 9538 int n;
9539 char **ap1, **ap2; 9539 char **ap1, **ap2;
@@ -9595,7 +9595,7 @@ showvars(const char *sep_prefix, int on, int off)
9595 * The set command builtin. 9595 * The set command builtin.
9596 */ 9596 */
9597static int 9597static int
9598setcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 9598setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
9599{ 9599{
9600 int retval; 9600 int retval;
9601 9601
@@ -9797,7 +9797,7 @@ static struct heredoc *heredoc;
9797 */ 9797 */
9798#define NEOF ((union node *)&tokpushback) 9798#define NEOF ((union node *)&tokpushback)
9799 9799
9800static void raise_error_syntax(const char *) ATTRIBUTE_NORETURN; 9800static void raise_error_syntax(const char *) NORETURN;
9801static void 9801static void
9802raise_error_syntax(const char *msg) 9802raise_error_syntax(const char *msg)
9803{ 9803{
@@ -9810,7 +9810,7 @@ raise_error_syntax(const char *msg)
9810 * is the token that is expected, or -1 if more than one type of token can 9810 * is the token that is expected, or -1 if more than one type of token can
9811 * occur at this point. 9811 * occur at this point.
9812 */ 9812 */
9813static void raise_error_unexpected_syntax(int) ATTRIBUTE_NORETURN; 9813static void raise_error_unexpected_syntax(int) NORETURN;
9814static void 9814static void
9815raise_error_unexpected_syntax(int token) 9815raise_error_unexpected_syntax(int token)
9816{ 9816{
@@ -11414,7 +11414,7 @@ evalstring(char *s, int mask)
11414 * The eval command. 11414 * The eval command.
11415 */ 11415 */
11416static int 11416static int
11417evalcmd(int argc ATTRIBUTE_UNUSED, char **argv) 11417evalcmd(int argc UNUSED_PARAM, char **argv)
11418{ 11418{
11419 char *p; 11419 char *p;
11420 char *concat; 11420 char *concat;
@@ -11563,7 +11563,7 @@ dotcmd(int argc, char **argv)
11563} 11563}
11564 11564
11565static int 11565static int
11566exitcmd(int argc ATTRIBUTE_UNUSED, char **argv) 11566exitcmd(int argc UNUSED_PARAM, char **argv)
11567{ 11567{
11568 if (stoppedjobs()) 11568 if (stoppedjobs())
11569 return 0; 11569 return 0;
@@ -11787,7 +11787,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
11787 * The trap builtin. 11787 * The trap builtin.
11788 */ 11788 */
11789static int 11789static int
11790trapcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 11790trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
11791{ 11791{
11792 char *action; 11792 char *action;
11793 char **ap; 11793 char **ap;
@@ -11840,7 +11840,7 @@ trapcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
11840 * Lists available builtins 11840 * Lists available builtins
11841 */ 11841 */
11842static int 11842static int
11843helpcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 11843helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
11844{ 11844{
11845 unsigned col; 11845 unsigned col;
11846 unsigned i; 11846 unsigned i;
@@ -11876,7 +11876,7 @@ helpcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
11876 * The export and readonly commands. 11876 * The export and readonly commands.
11877 */ 11877 */
11878static int 11878static int
11879exportcmd(int argc ATTRIBUTE_UNUSED, char **argv) 11879exportcmd(int argc UNUSED_PARAM, char **argv)
11880{ 11880{
11881 struct var *vp; 11881 struct var *vp;
11882 char *name; 11882 char *name;
@@ -11927,7 +11927,7 @@ unsetfunc(const char *name)
11927 * with the same name. 11927 * with the same name.
11928 */ 11928 */
11929static int 11929static int
11930unsetcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 11930unsetcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
11931{ 11931{
11932 char **ap; 11932 char **ap;
11933 int i; 11933 int i;
@@ -11965,7 +11965,7 @@ static const unsigned char timescmd_str[] ALIGN1 = {
11965}; 11965};
11966 11966
11967static int 11967static int
11968timescmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 11968timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
11969{ 11969{
11970 long clk_tck, s, t; 11970 long clk_tck, s, t;
11971 const unsigned char *p; 11971 const unsigned char *p;
@@ -12017,7 +12017,7 @@ dash_arith(const char *s)
12017 * Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru> 12017 * Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru>
12018 */ 12018 */
12019static int 12019static int
12020letcmd(int argc ATTRIBUTE_UNUSED, char **argv) 12020letcmd(int argc UNUSED_PARAM, char **argv)
12021{ 12021{
12022 arith_t i; 12022 arith_t i;
12023 12023
@@ -12059,7 +12059,7 @@ typedef enum __rlimit_resource rlim_t;
12059 * -e Use line editing (tty only) 12059 * -e Use line editing (tty only)
12060 */ 12060 */
12061static int 12061static int
12062readcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 12062readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12063{ 12063{
12064 static const char *const arg_REPLY[] = { "REPLY", NULL }; 12064 static const char *const arg_REPLY[] = { "REPLY", NULL };
12065 12065
@@ -12256,7 +12256,7 @@ readcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
12256} 12256}
12257 12257
12258static int 12258static int
12259umaskcmd(int argc ATTRIBUTE_UNUSED, char **argv) 12259umaskcmd(int argc UNUSED_PARAM, char **argv)
12260{ 12260{
12261 static const char permuser[3] ALIGN1 = "ugo"; 12261 static const char permuser[3] ALIGN1 = "ugo";
12262 static const char permmode[3] ALIGN1 = "rwx"; 12262 static const char permmode[3] ALIGN1 = "rwx";
@@ -12431,7 +12431,7 @@ printlim(enum limtype how, const struct rlimit *limit,
12431} 12431}
12432 12432
12433static int 12433static int
12434ulimitcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) 12434ulimitcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12435{ 12435{
12436 int c; 12436 int c;
12437 rlim_t val = 0; 12437 rlim_t val = 0;
@@ -13194,7 +13194,7 @@ arith(const char *expr, int *perrcode)
13194/* 13194/*
13195 * Called to exit the shell. 13195 * Called to exit the shell.
13196 */ 13196 */
13197static void exitshell(void) ATTRIBUTE_NORETURN; 13197static void exitshell(void) NORETURN;
13198static void 13198static void
13199exitshell(void) 13199exitshell(void)
13200{ 13200{
@@ -13373,7 +13373,7 @@ extern int etext();
13373 * is used to figure out how far we had gotten. 13373 * is used to figure out how far we had gotten.
13374 */ 13374 */
13375int ash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 13375int ash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
13376int ash_main(int argc ATTRIBUTE_UNUSED, char **argv) 13376int ash_main(int argc UNUSED_PARAM, char **argv)
13377{ 13377{
13378 char *shinit; 13378 char *shinit;
13379 volatile int state; 13379 volatile int state;