aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2025-08-03 23:29:35 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2025-08-03 23:29:35 +0200
commitd7d8ffed87679494be09d710c55dc0b7940e6547 (patch)
treedfff05ac112a9bbb7a676c3f7220b305f87c1c79 /shell
parent02b518db1ca70e2735a8b6251622a1f4e3e853b6 (diff)
downloadbusybox-w32-d7d8ffed87679494be09d710c55dc0b7940e6547.tar.gz
busybox-w32-d7d8ffed87679494be09d710c55dc0b7940e6547.tar.bz2
busybox-w32-d7d8ffed87679494be09d710c55dc0b7940e6547.zip
shell: typo and whitespace fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c16
-rw-r--r--shell/hush.c2
2 files changed, 2 insertions, 16 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 1a85eec71..9cacdff64 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -329,7 +329,7 @@ typedef long arith_t;
329 329
330/* ============ Shell options */ 330/* ============ Shell options */
331 331
332/* If you add/change options hare, update --help text too */ 332/* If you add/change options here, update --help text too */
333static const char *const optletters_optnames[] ALIGN_PTR = { 333static const char *const optletters_optnames[] ALIGN_PTR = {
334 "e" "errexit", 334 "e" "errexit",
335 "f" "noglob", 335 "f" "noglob",
@@ -1596,7 +1596,6 @@ struct stackmark {
1596 size_t stacknleft; 1596 size_t stacknleft;
1597}; 1597};
1598 1598
1599
1600struct globals_memstack { 1599struct globals_memstack {
1601 struct stack_block *g_stackp; // = &stackbase; 1600 struct stack_block *g_stackp; // = &stackbase;
1602 char *g_stacknxt; // = stackbase.space; 1601 char *g_stacknxt; // = stackbase.space;
@@ -1619,7 +1618,6 @@ extern struct globals_memstack *BB_GLOBAL_CONST ash_ptr_to_globals_memstack;
1619 sstrend = stackbase.space + MINSIZE; \ 1618 sstrend = stackbase.space + MINSIZE; \
1620} while (0) 1619} while (0)
1621 1620
1622
1623#define stackblock() ((void *)g_stacknxt) 1621#define stackblock() ((void *)g_stacknxt)
1624#define stackblocksize() g_stacknleft 1622#define stackblocksize() g_stacknleft
1625 1623
@@ -2121,7 +2119,6 @@ struct localvar {
2121# define VDYNAMIC 0 2119# define VDYNAMIC 0
2122#endif 2120#endif
2123 2121
2124
2125/* Need to be before varinit_data[] */ 2122/* Need to be before varinit_data[] */
2126#if ENABLE_LOCALE_SUPPORT 2123#if ENABLE_LOCALE_SUPPORT
2127static void FAST_FUNC 2124static void FAST_FUNC
@@ -3007,7 +3004,6 @@ pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
3007 3004
3008/* ============ ... */ 3005/* ============ ... */
3009 3006
3010
3011#define IBUFSIZ (ENABLE_FEATURE_EDITING ? CONFIG_FEATURE_EDITING_MAX_LEN : 1024) 3007#define IBUFSIZ (ENABLE_FEATURE_EDITING ? CONFIG_FEATURE_EDITING_MAX_LEN : 1024)
3012 3008
3013/* Syntax classes */ 3009/* Syntax classes */
@@ -3414,13 +3410,11 @@ struct alias {
3414 int flag; 3410 int flag;
3415}; 3411};
3416 3412
3417
3418static struct alias **atab; // [ATABSIZE]; 3413static struct alias **atab; // [ATABSIZE];
3419#define INIT_G_alias() do { \ 3414#define INIT_G_alias() do { \
3420 atab = xzalloc(ATABSIZE * sizeof(atab[0])); \ 3415 atab = xzalloc(ATABSIZE * sizeof(atab[0])); \
3421} while (0) 3416} while (0)
3422 3417
3423
3424static struct alias ** 3418static struct alias **
3425__lookupalias(const char *name) 3419__lookupalias(const char *name)
3426{ 3420{
@@ -3602,7 +3596,6 @@ unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
3602 3596
3603#endif /* ASH_ALIAS */ 3597#endif /* ASH_ALIAS */
3604 3598
3605
3606/* Mode argument to forkshell. Don't change FORK_FG or FORK_BG. */ 3599/* Mode argument to forkshell. Don't change FORK_FG or FORK_BG. */
3607#define FORK_FG 0 3600#define FORK_FG 0
3608#define FORK_BG 1 3601#define FORK_BG 1
@@ -5462,7 +5455,6 @@ stoppedjobs(void)
5462 return retval; 5455 return retval;
5463} 5456}
5464 5457
5465
5466/* 5458/*
5467 * Code for dealing with input/output redirection. 5459 * Code for dealing with input/output redirection.
5468 */ 5460 */
@@ -8935,7 +8927,6 @@ commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
8935} 8927}
8936#endif 8928#endif
8937 8929
8938
8939/*static int funcblocksize; // size of structures in function */ 8930/*static int funcblocksize; // size of structures in function */
8940/*static int funcstringsize; // size of strings in node */ 8931/*static int funcstringsize; // size of strings in node */
8941static void *funcblock; /* block to allocate function from */ 8932static void *funcblock; /* block to allocate function from */
@@ -10698,7 +10689,6 @@ goodname(const char *p)
10698 return endofname(p)[0] == '\0'; 10689 return endofname(p)[0] == '\0';
10699} 10690}
10700 10691
10701
10702/* 10692/*
10703 * Search for a command. This is called before we fork so that the 10693 * Search for a command. This is called before we fork so that the
10704 * location of the command will be available in the parent as well as 10694 * location of the command will be available in the parent as well as
@@ -13448,7 +13438,6 @@ parseheredoc(void)
13448 } 13438 }
13449} 13439}
13450 13440
13451
13452static const char * 13441static const char *
13453expandstr(const char *ps, int syntax_type) 13442expandstr(const char *ps, int syntax_type)
13454{ 13443{
@@ -14037,7 +14026,6 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
14037 entry->u = cmdp->param; 14026 entry->u = cmdp->param;
14038} 14027}
14039 14028
14040
14041/* 14029/*
14042 * The trap builtin. 14030 * The trap builtin.
14043 */ 14031 */
@@ -14631,7 +14619,6 @@ init(void)
14631 } 14619 }
14632} 14620}
14633 14621
14634
14635//usage:#define ash_trivial_usage 14622//usage:#define ash_trivial_usage
14636//usage: "[-il] [-|+Cabefmnuvx] [-|+o OPT]... [-c 'SCRIPT' [ARG0 ARGS] | FILE ARGS | -s ARGS]" 14623//usage: "[-il] [-|+Cabefmnuvx] [-|+o OPT]... [-c 'SCRIPT' [ARG0 ARGS] | FILE ARGS | -s ARGS]"
14637//////// comes from ^^^^^^^^^^optletters 14624//////// comes from ^^^^^^^^^^optletters
@@ -14911,7 +14898,6 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
14911 /* NOTREACHED */ 14898 /* NOTREACHED */
14912} 14899}
14913 14900
14914
14915/*- 14901/*-
14916 * Copyright (c) 1989, 1991, 1993, 1994 14902 * Copyright (c) 1989, 1991, 1993, 1994
14917 * The Regents of the University of California. All rights reserved. 14903 * The Regents of the University of California. All rights reserved.
diff --git a/shell/hush.c b/shell/hush.c
index 76a7b36a4..09ab6ebc0 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -10877,7 +10877,7 @@ int hush_main(int argc, char **argv)
10877/* Often both pgrps here are set to our pid - but not always! 10877/* Often both pgrps here are set to our pid - but not always!
10878 * Example: sh -c 'echo $$; hush; echo FIN' 10878 * Example: sh -c 'echo $$; hush; echo FIN'
10879 * Here, the parent shell is not interactive, so it does NOT set up 10879 * Here, the parent shell is not interactive, so it does NOT set up
10880 * a separate process group for its children, and we (hush) initinally 10880 * a separate process group for its children, and we (hush) initially
10881 * run in parent's process group (until we set up our own a few lines down). 10881 * run in parent's process group (until we set up our own a few lines down).
10882 */ 10882 */
10883 //bb_error_msg("process groups tty:%d hush:%d", G_saved_tty_pgrp, shell_pgrp); 10883 //bb_error_msg("process groups tty:%d hush:%d", G_saved_tty_pgrp, shell_pgrp);