aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-04-17 16:13:32 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-04-17 16:13:32 +0200
commit10ad622dc2a9fb6563fab13719ead8baf15ff9e4 (patch)
tree82312d6f38a517dcc7c0004f78d76c667f5a674b /shell
parentd85352b4ff51694cb35b429e4cef53302c9e7076 (diff)
downloadbusybox-10ad622dc2a9fb6563fab13719ead8baf15ff9e4.tar.gz
Spelling fixes in comments, documentation, tests and examples
By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c12
-rwxr-xr-xshell/ash_test/ash-misc/unicode1.tests2
-rw-r--r--shell/hush.c12
-rwxr-xr-xshell/hush_test/hush-misc/unicode1.tests2
4 files changed, 14 insertions, 14 deletions
diff --git a/shell/ash.c b/shell/ash.c
index e170bec2a..70ee15ed8 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3849,7 +3849,7 @@ setjobctl(int on)
}
/* fd is a tty at this point */
fd = fcntl(fd, F_DUPFD, 10);
- if (ofd >= 0) /* if it is "/dev/tty", close. If 0/1/2, dont */
+ if (ofd >= 0) /* if it is "/dev/tty", close. If 0/1/2, don't */
close(ofd);
if (fd < 0)
goto out; /* F_DUPFD failed */
@@ -6310,7 +6310,7 @@ static char *evalvar(char *p, int flags, struct strlist *var_str_list);
* $@ like $* since no splitting will be performed.
*
* var_str_list (can be NULL) is a list of "VAR=val" strings which take precedence
- * over shell varables. Needed for "A=a B=$A; echo $B" case - we use it
+ * over shell variables. Needed for "A=a B=$A; echo $B" case - we use it
* for correct expansion of "B=$A" word.
*/
static void
@@ -6520,8 +6520,8 @@ scanright(char *startp, char *rmesc, char *rmescend,
if (try2optimize) {
/* Maybe we can optimize this:
* if pattern ends with unescaped *, we can avoid checking
- * shorter strings: if "foo*" doesnt match "raw_value_of_v",
- * it wont match truncated "raw_value_of_" strings too.
+ * shorter strings: if "foo*" doesn't match "raw_value_of_v",
+ * it won't match truncated "raw_value_of_" strings too.
*/
unsigned plen = strlen(pattern);
/* Does it end with "*"? */
@@ -7248,7 +7248,7 @@ expandmeta(struct strlist *str /*, int flag*/)
// Which means you need to unescape the string, right? Not so fast:
// if there _is_ a file named "file\?" (with backslash), it is returned
// as "file\?" too (whichever pattern you used to find it, say, "file*").
-// You DONT KNOW by looking at the result whether you need to unescape it.
+// You DON'T KNOW by looking at the result whether you need to unescape it.
//
// Worse, globbing of "file\?" in a directory with two files, "file?" and "file\?",
// returns "file\?" - which is WRONG: "file\?" pattern matches "file?" file.
@@ -13088,7 +13088,7 @@ exportcmd(int argc UNUSED_PARAM, char **argv)
}
flag_off = ~flag_off;
- /*if (opt_p_not_specified) - bash doesnt check this. Try "export -p NAME" */
+ /*if (opt_p_not_specified) - bash doesn't check this. Try "export -p NAME" */
{
aptr = argptr;
name = *aptr;
diff --git a/shell/ash_test/ash-misc/unicode1.tests b/shell/ash_test/ash-misc/unicode1.tests
index 8788ba910..b8479cb41 100755
--- a/shell/ash_test/ash-misc/unicode1.tests
+++ b/shell/ash_test/ash-misc/unicode1.tests
@@ -5,7 +5,7 @@ a=`printf "\xcc\x80"`
# Should print 1
echo ${#a}
-# A Japanese katakana charachter U+30a3
+# A Japanese katakana character U+30a3
a=`printf "\xe3\x82\xa3"`
# Should print 1
echo ${#a}
diff --git a/shell/hush.c b/shell/hush.c
index 4123cc19e..e18920f50 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1908,7 +1908,7 @@ static int check_and_run_traps(void)
G.count_SIGCHLD++;
//bb_error_msg("[%d] check_and_run_traps: G.count_SIGCHLD:%d G.handled_SIGCHLD:%d", getpid(), G.count_SIGCHLD, G.handled_SIGCHLD);
/* Note:
- * We dont do 'last_sig = sig' here -> NOT returning this sig.
+ * We don't do 'last_sig = sig' here -> NOT returning this sig.
* This simplifies wait builtin a bit.
*/
break;
@@ -1917,7 +1917,7 @@ static int check_and_run_traps(void)
debug_printf_exec("%s: sig:%d default handling is to ignore\n", __func__, sig);
/* SIGTERM, SIGQUIT, SIGTTIN, SIGTTOU, SIGTSTP */
/* Note:
- * We dont do 'last_sig = sig' here -> NOT returning this sig.
+ * We don't do 'last_sig = sig' here -> NOT returning this sig.
* Example: wait is not interrupted by TERM
* in interactive shell, because TERM is ignored.
*/
@@ -2280,7 +2280,7 @@ static void reinit_unicode_for_hush(void)
* AT\
* H\
* \
- * It excercises a lot of corner cases.
+ * It exercises a lot of corner cases.
*/
static void cmdedit_update_prompt(void)
{
@@ -5235,7 +5235,7 @@ static void o_addblock_duplicate_backslash(o_string *o, const char *str, int len
/* And now we want to add { or } and continue:
* o_addchr(o, c);
* continue;
- * luckily, just falling throught achieves this.
+ * luckily, just falling through achieves this.
*/
}
#endif
@@ -5830,7 +5830,7 @@ static NOINLINE int expand_vars_to_list(o_string *output, int n, char *arg)
arg++;
/* Can't just stuff it into output o_string,
* expanded result may need to be globbed
- * and $IFS-splitted */
+ * and $IFS-split */
debug_printf_subst("SUBST '%s' first_ch %x\n", arg, first_ch);
G.last_exitcode = process_command_subs(&subst_result, arg);
debug_printf_subst("SUBST RES:%d '%s'\n", G.last_exitcode, subst_result.data);
@@ -7320,7 +7320,7 @@ static int process_wait_result(struct pipe *fg_pipe, pid_t childpid, int status)
/* There are still running processes in the fg_pipe */
return -1;
}
- /* It wasnt in fg_pipe, look for process in bg pipes */
+ /* It wasn't in fg_pipe, look for process in bg pipes */
}
#if ENABLE_HUSH_JOB
diff --git a/shell/hush_test/hush-misc/unicode1.tests b/shell/hush_test/hush-misc/unicode1.tests
index 8788ba910..b8479cb41 100755
--- a/shell/hush_test/hush-misc/unicode1.tests
+++ b/shell/hush_test/hush-misc/unicode1.tests
@@ -5,7 +5,7 @@ a=`printf "\xcc\x80"`
# Should print 1
echo ${#a}
-# A Japanese katakana charachter U+30a3
+# A Japanese katakana character U+30a3
a=`printf "\xe3\x82\xa3"`
# Should print 1
echo ${#a}