aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-01-22 22:55:11 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-01-22 22:55:11 +0000
commit86f5c9906beac527f3d7966f24811b571a589e08 (patch)
tree1c9eba853c728b5d734506e1c66c269d96fe46ea /shell/ash.c
parent2edf52643d3eb3d13f26d31f9678cf122f2063bc (diff)
downloadbusybox-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.c34
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
236static void exraise(int) __attribute__((__noreturn__)); 224static void exraise(int) ATTRIBUTE_NORETURN;
237static void onint(void) __attribute__((__noreturn__)); 225static void onint(void) ATTRIBUTE_NORETURN;
238 226
239static void sh_error(const char *, ...) __attribute__((__noreturn__)); 227static void sh_error(const char *, ...) ATTRIBUTE_NORETURN;
240static void exerror(int, const char *, ...) __attribute__((__noreturn__)); 228static void exerror(int, const char *, ...) ATTRIBUTE_NORETURN;
241 229
242static void sh_warnx(const char *, ...); 230static void sh_warnx(const char *, ...);
243 231
@@ -1400,7 +1388,7 @@ struct cmdentry {
1400static const char *pathopt; /* set by padvance */ 1388static const char *pathopt; /* set by padvance */
1401 1389
1402static void shellexec(char **, const char *, int) 1390static void shellexec(char **, const char *, int)
1403 __attribute__((__noreturn__)); 1391 ATTRIBUTE_NORETURN;
1404static char *padvance(const char **, const char *); 1392static char *padvance(const char **, const char *);
1405static void find_command(char *, struct cmdentry *, int, const char *); 1393static void find_command(char *, struct cmdentry *, int, const char *);
1406static struct builtincmd *find_builtin(const char *); 1394static struct builtincmd *find_builtin(const char *);
@@ -2026,7 +2014,7 @@ static void ignoresig(int);
2026static void onsig(int); 2014static void onsig(int);
2027static int dotrap(void); 2015static int dotrap(void);
2028static void setinteractive(int); 2016static void setinteractive(int);
2029static void exitshell(void) __attribute__((__noreturn__)); 2017static void exitshell(void) ATTRIBUTE_NORETURN;
2030static int decode_signal(const char *, int); 2018static int decode_signal(const char *, int);
2031 2019
2032/* 2020/*
@@ -2504,7 +2492,7 @@ setpwd(const char *val, int setold)
2504 2492
2505 2493
2506static void exverror(int, const char *, va_list) 2494static 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 *);
4518static char *scanleft(char *, char *, char *, char *, int, int); 4506static char *scanleft(char *, char *, char *, char *, int, int);
4519static char *scanright(char *, char *, char *, char *, int, int); 4507static char *scanright(char *, char *, char *, char *, int, int);
4520static void varunset(const char *, const char *, const char *, int) 4508static 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);
9325static int xxreadtoken(void); 9313static int xxreadtoken(void);
9326static int readtoken1(int firstc, int syntax, char *eofmark, int striptabs); 9314static int readtoken1(int firstc, int syntax, char *eofmark, int striptabs);
9327static int noexpand(char *); 9315static int noexpand(char *);
9328static void synexpect(int) __attribute__((__noreturn__)); 9316static void synexpect(int) ATTRIBUTE_NORETURN;
9329static void synerror(const char *) __attribute__((__noreturn__)); 9317static void synerror(const char *) ATTRIBUTE_NORETURN;
9330static void setprompt(int); 9318static void setprompt(int);
9331 9319
9332 9320