diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-22 22:55:11 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-01-22 22:55:11 +0000 |
commit | 86f5c9906beac527f3d7966f24811b571a589e08 (patch) | |
tree | 1c9eba853c728b5d734506e1c66c269d96fe46ea /shell/ash.c | |
parent | 2edf52643d3eb3d13f26d31f9678cf122f2063bc (diff) | |
download | busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.tar.gz busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.tar.bz2 busybox-w32-86f5c9906beac527f3d7966f24811b571a589e08.zip |
- add platform.h.
- use shorter boilerplate while at it.
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/shell/ash.c b/shell/ash.c index db537c44d..ef1fe0af7 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -12,19 +12,7 @@ | |||
12 | * This code is derived from software contributed to Berkeley by | 12 | * This code is derived from software contributed to Berkeley by |
13 | * Kenneth Almquist. | 13 | * Kenneth Almquist. |
14 | * | 14 | * |
15 | * This program is free software; you can redistribute it and/or modify | 15 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
16 | * it under the terms of the GNU General Public License as published by | ||
17 | * the Free Software Foundation; either version 2 of the License, or | ||
18 | * (at your option) any later version. | ||
19 | * | ||
20 | * This program is distributed in the hope that it will be useful, | ||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
23 | * General Public License for more details. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License | ||
26 | * along with this program; if not, write to the Free Software | ||
27 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
28 | * | 16 | * |
29 | * Original BSD copyright notice is retained at the end of this file. | 17 | * Original BSD copyright notice is retained at the end of this file. |
30 | */ | 18 | */ |
@@ -233,11 +221,11 @@ static volatile sig_atomic_t pendingsigs; | |||
233 | /* EXSIG is turned off by evalbltin(). */ | 221 | /* EXSIG is turned off by evalbltin(). */ |
234 | 222 | ||
235 | 223 | ||
236 | static void exraise(int) __attribute__((__noreturn__)); | 224 | static void exraise(int) ATTRIBUTE_NORETURN; |
237 | static void onint(void) __attribute__((__noreturn__)); | 225 | static void onint(void) ATTRIBUTE_NORETURN; |
238 | 226 | ||
239 | static void sh_error(const char *, ...) __attribute__((__noreturn__)); | 227 | static void sh_error(const char *, ...) ATTRIBUTE_NORETURN; |
240 | static void exerror(int, const char *, ...) __attribute__((__noreturn__)); | 228 | static void exerror(int, const char *, ...) ATTRIBUTE_NORETURN; |
241 | 229 | ||
242 | static void sh_warnx(const char *, ...); | 230 | static void sh_warnx(const char *, ...); |
243 | 231 | ||
@@ -1400,7 +1388,7 @@ struct cmdentry { | |||
1400 | static const char *pathopt; /* set by padvance */ | 1388 | static const char *pathopt; /* set by padvance */ |
1401 | 1389 | ||
1402 | static void shellexec(char **, const char *, int) | 1390 | static void shellexec(char **, const char *, int) |
1403 | __attribute__((__noreturn__)); | 1391 | ATTRIBUTE_NORETURN; |
1404 | static char *padvance(const char **, const char *); | 1392 | static char *padvance(const char **, const char *); |
1405 | static void find_command(char *, struct cmdentry *, int, const char *); | 1393 | static void find_command(char *, struct cmdentry *, int, const char *); |
1406 | static struct builtincmd *find_builtin(const char *); | 1394 | static struct builtincmd *find_builtin(const char *); |
@@ -2026,7 +2014,7 @@ static void ignoresig(int); | |||
2026 | static void onsig(int); | 2014 | static void onsig(int); |
2027 | static int dotrap(void); | 2015 | static int dotrap(void); |
2028 | static void setinteractive(int); | 2016 | static void setinteractive(int); |
2029 | static void exitshell(void) __attribute__((__noreturn__)); | 2017 | static void exitshell(void) ATTRIBUTE_NORETURN; |
2030 | static int decode_signal(const char *, int); | 2018 | static int decode_signal(const char *, int); |
2031 | 2019 | ||
2032 | /* | 2020 | /* |
@@ -2504,7 +2492,7 @@ setpwd(const char *val, int setold) | |||
2504 | 2492 | ||
2505 | 2493 | ||
2506 | static void exverror(int, const char *, va_list) | 2494 | static void exverror(int, const char *, va_list) |
2507 | __attribute__((__noreturn__)); | 2495 | ATTRIBUTE_NORETURN; |
2508 | 2496 | ||
2509 | /* | 2497 | /* |
2510 | * Called to raise an exception. Since C doesn't include exceptions, we | 2498 | * Called to raise an exception. Since C doesn't include exceptions, we |
@@ -4518,7 +4506,7 @@ static size_t esclen(const char *, const char *); | |||
4518 | static char *scanleft(char *, char *, char *, char *, int, int); | 4506 | static char *scanleft(char *, char *, char *, char *, int, int); |
4519 | static char *scanright(char *, char *, char *, char *, int, int); | 4507 | static char *scanright(char *, char *, char *, char *, int, int); |
4520 | static void varunset(const char *, const char *, const char *, int) | 4508 | static void varunset(const char *, const char *, const char *, int) |
4521 | __attribute__((__noreturn__)); | 4509 | ATTRIBUTE_NORETURN; |
4522 | 4510 | ||
4523 | 4511 | ||
4524 | #define pmatch(a, b) !fnmatch((a), (b), 0) | 4512 | #define pmatch(a, b) !fnmatch((a), (b), 0) |
@@ -9325,8 +9313,8 @@ static int readtoken(void); | |||
9325 | static int xxreadtoken(void); | 9313 | static int xxreadtoken(void); |
9326 | static int readtoken1(int firstc, int syntax, char *eofmark, int striptabs); | 9314 | static int readtoken1(int firstc, int syntax, char *eofmark, int striptabs); |
9327 | static int noexpand(char *); | 9315 | static int noexpand(char *); |
9328 | static void synexpect(int) __attribute__((__noreturn__)); | 9316 | static void synexpect(int) ATTRIBUTE_NORETURN; |
9329 | static void synerror(const char *) __attribute__((__noreturn__)); | 9317 | static void synerror(const char *) ATTRIBUTE_NORETURN; |
9330 | static void setprompt(int); | 9318 | static void setprompt(int); |
9331 | 9319 | ||
9332 | 9320 | ||