aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-10-02 04:38:07 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-10-02 04:38:07 +0200
commit37dc08b874d6a24bd5e4b6aff62577ecc1364275 (patch)
treef6b88440b6d5d4c90871a1f6979ae14eac37a37c
parent0cdb7ea380887053946664650673ff6f57310994 (diff)
downloadbusybox-w32-37dc08b874d6a24bd5e4b6aff62577ecc1364275.tar.gz
busybox-w32-37dc08b874d6a24bd5e4b6aff62577ecc1364275.tar.bz2
busybox-w32-37dc08b874d6a24bd5e4b6aff62577ecc1364275.zip
ash: style fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/shell/ash.c b/shell/ash.c
index c358c5f85..f8c3e0c19 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -415,7 +415,8 @@ static void trace_vprintf(const char *fmt, va_list va);
415#define is_name(c) ((c) == '_' || isalpha((unsigned char)(c))) 415#define is_name(c) ((c) == '_' || isalpha((unsigned char)(c)))
416#define is_in_name(c) ((c) == '_' || isalnum((unsigned char)(c))) 416#define is_in_name(c) ((c) == '_' || isalnum((unsigned char)(c)))
417 417
418static int isdigit_str9(const char *str) 418static int
419isdigit_str9(const char *str)
419{ 420{
420 int maxlen = 9 + 1; /* max 9 digits: 999999999 */ 421 int maxlen = 9 + 1; /* max 9 digits: 999999999 */
421 while (--maxlen && isdigit(*str)) 422 while (--maxlen && isdigit(*str))
@@ -423,7 +424,8 @@ static int isdigit_str9(const char *str)
423 return (*str == '\0'); 424 return (*str == '\0');
424} 425}
425 426
426static const char *var_end(const char *var) 427static const char *
428var_end(const char *var)
427{ 429{
428 while (*var) 430 while (*var)
429 if (*var++ == '=') 431 if (*var++ == '=')
@@ -2142,7 +2144,8 @@ lookupvar(const char *name)
2142 return NULL; 2144 return NULL;
2143} 2145}
2144 2146
2145static void reinit_unicode_for_ash(void) 2147static void
2148reinit_unicode_for_ash(void)
2146{ 2149{
2147 /* Unicode support should be activated even if LANG is set 2150 /* Unicode support should be activated even if LANG is set
2148 * _during_ shell execution, not only if it was set when 2151 * _during_ shell execution, not only if it was set when
@@ -3171,7 +3174,8 @@ static struct alias **atab; // [ATABSIZE];
3171 3174
3172 3175
3173static struct alias ** 3176static struct alias **
3174__lookupalias(const char *name) { 3177__lookupalias(const char *name)
3178{
3175 unsigned int hashval; 3179 unsigned int hashval;
3176 struct alias **app; 3180 struct alias **app;
3177 const char *p; 3181 const char *p;
@@ -5234,7 +5238,8 @@ struct redirtab {
5234}; 5238};
5235#define redirlist (G_var.redirlist) 5239#define redirlist (G_var.redirlist)
5236 5240
5237static int need_to_remember(struct redirtab *rp, int fd) 5241static int
5242need_to_remember(struct redirtab *rp, int fd)
5238{ 5243{
5239 int i; 5244 int i;
5240 5245
@@ -5251,7 +5256,8 @@ static int need_to_remember(struct redirtab *rp, int fd)
5251} 5256}
5252 5257
5253/* "hidden" fd is a fd used to read scripts, or a copy of such */ 5258/* "hidden" fd is a fd used to read scripts, or a copy of such */
5254static int is_hidden_fd(struct redirtab *rp, int fd) 5259static int
5260is_hidden_fd(struct redirtab *rp, int fd)
5255{ 5261{
5256 int i; 5262 int i;
5257 struct parsefile *pf; 5263 struct parsefile *pf;
@@ -8628,7 +8634,8 @@ static
8628#endif 8634#endif
8629int evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__)); 8635int evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__));
8630 8636
8631static int skiploop(void) 8637static int
8638skiploop(void)
8632{ 8639{
8633 int skip = evalskip; 8640 int skip = evalskip;
8634 8641
@@ -11233,7 +11240,8 @@ parse_command(void)
11233} 11240}
11234 11241
11235#if ENABLE_ASH_BASH_COMPAT 11242#if ENABLE_ASH_BASH_COMPAT
11236static int decode_dollar_squote(void) 11243static int
11244decode_dollar_squote(void)
11237{ 11245{
11238 static const char C_escapes[] ALIGN1 = "nrbtfav""x\\01234567"; 11246 static const char C_escapes[] ALIGN1 = "nrbtfav""x\\01234567";
11239 int c, cnt; 11247 int c, cnt;