aboutsummaryrefslogtreecommitdiff
path: root/shell
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
parent2edf52643d3eb3d13f26d31f9678cf122f2063bc (diff)
downloadbusybox-86f5c9906beac527f3d7966f24811b571a589e08.tar.gz
- add platform.h.
- use shorter boilerplate while at it.
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c34
-rw-r--r--shell/hush.c16
-rw-r--r--shell/lash.c17
3 files changed, 15 insertions, 52 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 @@
* This code is derived from software contributed to Berkeley by
* Kenneth Almquist.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*
* Original BSD copyright notice is retained at the end of this file.
*/
@@ -233,11 +221,11 @@ static volatile sig_atomic_t pendingsigs;
/* EXSIG is turned off by evalbltin(). */
-static void exraise(int) __attribute__((__noreturn__));
-static void onint(void) __attribute__((__noreturn__));
+static void exraise(int) ATTRIBUTE_NORETURN;
+static void onint(void) ATTRIBUTE_NORETURN;
-static void sh_error(const char *, ...) __attribute__((__noreturn__));
-static void exerror(int, const char *, ...) __attribute__((__noreturn__));
+static void sh_error(const char *, ...) ATTRIBUTE_NORETURN;
+static void exerror(int, const char *, ...) ATTRIBUTE_NORETURN;
static void sh_warnx(const char *, ...);
@@ -1400,7 +1388,7 @@ struct cmdentry {
static const char *pathopt; /* set by padvance */
static void shellexec(char **, const char *, int)
- __attribute__((__noreturn__));
+ ATTRIBUTE_NORETURN;
static char *padvance(const char **, const char *);
static void find_command(char *, struct cmdentry *, int, const char *);
static struct builtincmd *find_builtin(const char *);
@@ -2026,7 +2014,7 @@ static void ignoresig(int);
static void onsig(int);
static int dotrap(void);
static void setinteractive(int);
-static void exitshell(void) __attribute__((__noreturn__));
+static void exitshell(void) ATTRIBUTE_NORETURN;
static int decode_signal(const char *, int);
/*
@@ -2504,7 +2492,7 @@ setpwd(const char *val, int setold)
static void exverror(int, const char *, va_list)
- __attribute__((__noreturn__));
+ ATTRIBUTE_NORETURN;
/*
* Called to raise an exception. Since C doesn't include exceptions, we
@@ -4518,7 +4506,7 @@ static size_t esclen(const char *, const char *);
static char *scanleft(char *, char *, char *, char *, int, int);
static char *scanright(char *, char *, char *, char *, int, int);
static void varunset(const char *, const char *, const char *, int)
- __attribute__((__noreturn__));
+ ATTRIBUTE_NORETURN;
#define pmatch(a, b) !fnmatch((a), (b), 0)
@@ -9325,8 +9313,8 @@ static int readtoken(void);
static int xxreadtoken(void);
static int readtoken1(int firstc, int syntax, char *eofmark, int striptabs);
static int noexpand(char *);
-static void synexpect(int) __attribute__((__noreturn__));
-static void synerror(const char *) __attribute__((__noreturn__));
+static void synexpect(int) ATTRIBUTE_NORETURN;
+static void synerror(const char *) ATTRIBUTE_NORETURN;
static void setprompt(int);
diff --git a/shell/hush.c b/shell/hush.c
index e83d49a86..70533a2b0 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -75,19 +75,7 @@
* maybe change map[] to use 2-bit entries
* (eventually) remove all the printf's
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*/
#include <ctype.h> /* isalpha, isdigit */
#include <unistd.h> /* getpid */
@@ -369,7 +357,7 @@ static int free_pipe(struct pipe *pi, int indent);
/* really run the final data structures: */
static int setup_redirects(struct child_prog *prog, int squirrel[]);
static int run_list_real(struct pipe *pi);
-static void pseudo_exec(struct child_prog *child) __attribute__ ((noreturn));
+static void pseudo_exec(struct child_prog *child) ATTRIBUTE_NORETURN;
static int run_pipe_real(struct pipe *pi);
/* extended glob support: */
static int globhack(const char *src, int flags, glob_t *pglob);
diff --git a/shell/lash.c b/shell/lash.c
index f4cadde14..a23f5f4d4 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -8,20 +8,7 @@
* under the following liberal license: "We have placed this source code in the
* public domain. Use it in any project, free or commercial."
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*/
/* This shell's parsing engine is officially at a dead-end. Future
@@ -148,7 +135,7 @@ static void remove_job(struct jobset *j_list, struct job *job);
static int get_command(FILE * source, char *command);
static int parse_command(char **command_ptr, struct job *job, int *inbg);
static int run_command(struct job *newjob, int inbg, int outpipe[2]);
-static int pseudo_exec(struct child_prog *cmd) __attribute__ ((noreturn));
+static int pseudo_exec(struct child_prog *cmd) ATTRIBUTE_NORETURN;
static int busy_loop(FILE * input);