Spelling fixes in comments, documentation, tests and examples

By klemens <ka7@github.com>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2017-04-17 16:13:32 +02:00
parent d85352b4ff
commit 10ad622dc2
41 changed files with 80 additions and 80 deletions

View File

@ -18,7 +18,7 @@
* known difference between busybox dpkg and the official dpkg that i don't
* consider important, its worth keeping a note of differences anyway, just to
* make it easier to maintain.
* - the first value for the confflile: field isnt placed on a new line.
* - the first value for the confflile: field isn't placed on a new line.
* - when installing a package the status: field is placed at the end of the
* section, rather than just after the package: field.
*
@ -110,7 +110,7 @@ typedef struct common_node_s {
edge_t **edge;
} common_node_t;
/* Currently it doesnt store packages that have state-status of not-installed
/* Currently it doesn't store packages that have state-status of not-installed
* So it only really has to be the size of the maximum number of packages
* likely to be installed at any one time, so there is a bit of leeway here */
#define STATUS_HASH_PRIME 8191
@ -205,7 +205,7 @@ static int search_name_hashtable(const char *key)
return probe_address;
}
/* this DOESNT add the key to the hashtable
/* this DOESN'T add the key to the hashtable
* TODO make it consistent with search_name_hashtable
*/
static unsigned search_status_hashtable(const char *key)
@ -467,7 +467,7 @@ static void add_split_dependencies(common_node_t *parent_node, const char *whole
version = strchr(field2, '(');
if (version == NULL) {
edge->operator = VER_ANY;
/* Get the versions hash number, adding it if the number isnt already in there */
/* Get the versions hash number, adding it if the number isn't already in there */
edge->version = search_name_hashtable("ANY");
} else {
/* Skip leading ' ' or '(' */
@ -496,7 +496,7 @@ static void add_split_dependencies(common_node_t *parent_node, const char *whole
/* Truncate version at trailing ' ' or ')' */
version[strcspn(version, " )")] = '\0';
/* Get the versions hash number, adding it if the number isnt already in there */
/* Get the versions hash number, adding it if the number isn't already in there */
edge->version = search_name_hashtable(version);
}
@ -562,7 +562,7 @@ static int read_package_field(const char *package_buffer, char **field_name, cha
offset_name_end = offset;
offset_value_start = next_offset;
}
/* TODO: Name might still have trailing spaces if ':' isnt
/* TODO: Name might still have trailing spaces if ':' isn't
* immediately after name */
break;
case '\n':
@ -776,7 +776,7 @@ static void index_status_file(const char *filename)
const unsigned package_num = fill_package_struct(control_buffer);
if (package_num != -1) {
status_node = xmalloc(sizeof(status_node_t));
/* fill_package_struct doesnt handle the status field */
/* fill_package_struct doesn't handle the status field */
status_line = strstr(control_buffer, "Status:");
if (status_line != NULL) {
status_line += 7;
@ -850,7 +850,7 @@ static void write_status_file(deb_file_t **deb_file)
if (status_hashtable[status_num] != NULL) {
const char *status_from_hashtable = name_hashtable[status_hashtable[status_num]->status];
if (strcmp(status_from_file, status_from_hashtable) != 0) {
/* New status isnt exactly the same as old status */
/* New status isn't exactly the same as old status */
const int state_status = get_status(status_num, 3);
if ((strcmp("installed", name_hashtable[state_status]) == 0)
|| (strcmp("unpacked", name_hashtable[state_status]) == 0)
@ -919,7 +919,7 @@ static void write_status_file(deb_file_t **deb_file)
}
}
}
/* If the package from the status file wasnt handle above, do it now*/
/* If the package from the status file wasn't handle above, do it now*/
if (!write_flag) {
fprintf(new_status_file, "%s\n\n", control_buffer);
}
@ -946,7 +946,7 @@ static void write_status_file(deb_file_t **deb_file)
if (errno != ENOENT)
bb_error_msg_and_die("can't create backup status file");
/* Its ok if renaming the status file fails because status
* file doesnt exist, maybe we are starting from scratch */
* file doesn't exist, maybe we are starting from scratch */
bb_error_msg("no status file found, creating new one");
}
@ -1061,7 +1061,7 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
}
/* Check dependendcies */
/* Check dependentcies */
for (i = 0; i < PACKAGE_HASH_PRIME; i++) {
int status_num = 0;
int number_of_alternatives = 0;
@ -1244,7 +1244,7 @@ static void run_package_script_or_die(const char *package_name, const char *scri
script_path = xasprintf("/var/lib/dpkg/info/%s.%s", package_name, script_type);
/* If the file doesnt exist is isnt fatal */
/* If the file doesn't exist it isn't fatal */
result = access(script_path, F_OK) ? EXIT_SUCCESS : system(script_path);
free(script_path);
if (result)
@ -1839,7 +1839,7 @@ int dpkg_main(int argc UNUSED_PARAM, char **argv)
) {
status_node = xmalloc(sizeof(status_node_t));
status_node->package = deb_file[deb_count]->package;
/* reinstreq isnt changed to "ok" until the package control info
/* reinstreq isn't changed to "ok" until the package control info
* is written to the status file*/
status_node->status = search_name_hashtable("install reinstreq not-installed");
status_hashtable[status_num] = status_node;

View File

@ -308,7 +308,7 @@ static int get_next_block(bunzip_data *bd)
base = hufGroup->base - 1;
limit = hufGroup->limit - 1;
/* Calculate permute[]. Concurently, initialize temp[] and limit[]. */
/* Calculate permute[]. Concurrently, initialize temp[] and limit[]. */
pp = 0;
for (i = minLen; i <= maxLen; i++) {
int k;

View File

@ -486,11 +486,11 @@ static __always_inline void XZ_FUNC rc_normalize(struct rc_dec *rc)
}
/*
* Decode one bit. In some versions, this function has been splitted in three
* Decode one bit. In some versions, this function has been split in three
* functions so that the compiler is supposed to be able to more easily avoid
* an extra branch. In this particular version of the LZMA decoder, this
* doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3
* on x86). Using a non-splitted version results in nicer looking code too.
* on x86). Using a non-split version results in nicer looking code too.
*
* NOTE: This must return an int. Do not make it return a bool or the speed
* of the code generated by GCC 3.x decreases 10-15 %. (GCC 4.3 doesn't care,

View File

@ -529,8 +529,8 @@ static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statb
/*
* Check to see if we are dealing with a hard link.
* If so -
* Treat the first occurance of a given dev/inode as a file while
* treating any additional occurances as hard links. This is done
* Treat the first occurrence of a given dev/inode as a file while
* treating any additional occurrences as hard links. This is done
* by adding the file information to the HardLinkInfo linked list.
*/
tbInfo->hlInfo = NULL;

View File

@ -2,7 +2,7 @@
/*
* dos2unix for BusyBox
*
* dos2unix '\n' convertor 0.5.0
* dos2unix '\n' converter 0.5.0
* based on Unix2Dos 0.9.0 by Peter Hanecak (made 19.2.1997)
* Copyright 1997,.. by Peter Hanecak <hanecak@megaloman.sk>.
* All rights reserved.

View File

@ -45,7 +45,7 @@ intention.
</td></tr><tr><th valign=top align=left>Required knowledge: </th>
<td valign=top align=left>You have to know what it means to catch SIGINT or SIGQUIT and how
processes are waiting for other processes (childs) they spawned.
processes are waiting for other processes (children) they spawned.
</td></tr></table>
@ -366,7 +366,7 @@ signal, it has to take care of communicating the signal status
itself.
<p>Some programs don't do this. On SIGINT, they do cleanup and exit
immediatly, but the calling shell isn't told about the non-normal exit
immediately, but the calling shell isn't told about the non-normal exit
and it will call the next program in the script.
<p>As a result, the user hits SIGINT and while one program exits, the
@ -446,7 +446,7 @@ handlers, so it is portable.
<code>trap</code> command. Here, the same as for C programs apply. If
the intention of SIGINT is to end your program, you have to exit in a
way that the calling programs "sees" that you have been killed. If
you don't catch SIGINT, this happend automatically, but of you catch
you don't catch SIGINT, this happened automatically, but of you catch
SIGINT, i.e. to do cleanup work, you have to end the program by
killing yourself, not by calling exit.
@ -466,7 +466,7 @@ files (which isn't really portable in C, though).
bourne shell. Every language implementation that lets you catch SIGINT
should also give you the option to reset the signal and kill yourself.
<P>It is always desireable to exit the right way, even if you don't
<P>It is always desirable to exit the right way, even if you don't
expect your usual callers to depend on it, some unusual one will come
along. This proper exit status will be needed for WCE and will not
hurt when the calling shell uses IUE or WUE.
@ -565,7 +565,7 @@ comments the scripts echo.
<th>What happens when a shellscript called emacs, the user did not use
<code>C-c</code> and the script has additional commands in it?</th>
<th>What happens if a non-interactive child catches SIGINT?</th>
<th>To behave properly, childs must do what?</th>
<th>To behave properly, children must do what?</th>
</tr>
<tr valign=top align=left>

View File

@ -329,7 +329,7 @@ With "const int" compiler may fail to optimize it out and will reserve
a real storage in rodata for it! (Hopefully, newer gcc will get better
at it...). With "define", you have slight risk of polluting namespace
(#define doesn't allow you to redefine the name in the inner scopes),
and complex "define" are evaluated each time they uesd, not once
and complex "define" are evaluated each time they used, not once
at declarations like enums. Also, the preprocessor does _no_ type checking
whatsoever, making it much more error prone.

View File

@ -337,7 +337,7 @@ static int get_address(const char *my_str, int *linenum, regex_t ** regex)
if (isdigit(*my_str)) {
*linenum = strtol(my_str, (char**)&pos, 10);
/* endstr shouldnt ever equal NULL */
/* endstr shouldn't ever equal NULL */
} else if (*my_str == '$') {
*linenum = -1;
pos++;
@ -444,7 +444,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
free(fname);
break;
}
/* Ignore case (gnu exension) */
/* Ignore case (gnu extension) */
case 'i':
case 'I':
cflags |= REG_ICASE;
@ -587,7 +587,7 @@ static const char *parse_cmd_args(sed_cmd_t *sed_cmd, const char *cmdstr)
free(match);
free(replace);
}
/* if it wasnt a single-letter command that takes no arguments
/* if it wasn't a single-letter command that takes no arguments
* then it must be an invalid command.
*/
else if (idx >= IDX_nul) { /* not d,D,g,G,h,H,l,n,N,p,P,q,x,=,{,} */
@ -751,7 +751,7 @@ static void do_subst_w_backrefs(char *line, char *replace)
continue;
}
/* I _think_ it is impossible to get '\' to be
* the last char in replace string. Thus we dont check
* the last char in replace string. Thus we don't check
* for replace[i] == NUL. (counterexample anyone?) */
/* if we find a backslash escaped character, print the character */
pipe_putc(replace[i]);

View File

@ -21,7 +21,7 @@
# ntpsrv=10.34.32.125 10.34.255.7
#
# renew: lease is renewed. Environment is similar to "bound".
# The IP address does not change, however, the other DHCP paramaters,
# The IP address does not change, however, the other DHCP parameters,
# such as the default gateway, subnet mask, and dns server may change.
#
# nak: udhcpc received a NAK message.

View File

@ -182,7 +182,7 @@
//config: default y
//config: depends on FIND
//config: help
//config: If the file is a directory, dont descend into it. Useful for
//config: If the file is a directory, don't descend into it. Useful for
//config: exclusion .svn and CVS directories.
//config:
//config:config FEATURE_FIND_DELETE

View File

@ -515,7 +515,7 @@ static int grep_file(FILE *file)
if (option_mask32 & OPT_o) {
if (FGREP_FLAG) {
/* -Fo just prints the pattern
* (unless -v: -Fov doesnt print anything at all) */
* (unless -v: -Fov doesn't print anything at all) */
if (found)
print_line(gl->pattern, strlen(gl->pattern), linenum, ':');
} else while (1) {
@ -823,7 +823,7 @@ int grep_main(int argc UNUSED_PARAM, char **argv)
grep_done: ;
} while (*argv && *++argv);
/* destroy all the elments in the pattern list */
/* destroy all the elements in the pattern list */
if (ENABLE_FEATURE_CLEAN_UP) {
while (pattern_head) {
llist_t *pattern_head_ptr = pattern_head;

View File

@ -128,7 +128,7 @@ const char *opt_complementary
"abc" If groups of two or more chars are specified, the first char
is the main option and the other chars are secondary options.
Their flags will be turned on if the main option is found even
if they are not specifed on the command line. For example:
if they are not specified on the command line. For example:
opt_complementary = "abc";
flags = getopt32(argv, "abcd")

View File

@ -14,7 +14,7 @@
* exit using the atexit function to make valgrind happy.
* 2) the passwd/group files:
* a) must contain the expected number of fields (as per count of field
* delimeters ":") or we will complain with a error message.
* delimiters ":") or we will complain with a error message.
* b) leading and trailing whitespace in fields is stripped.
* c) some fields are not allowed to be empty (e.g. username, uid/gid),
* and in this case NULL is returned and errno is set to EINVAL.
@ -149,7 +149,7 @@ static struct statics *get_S(void)
/* Internal functions */
/* Divide the passwd/group/shadow record in fields
* by substituting the given delimeter
* by substituting the given delimiter
* e.g. ':' or ',' with '\0'.
* Returns the number of fields found.
* Strips leading and trailing whitespace in fields.

View File

@ -64,7 +64,7 @@ OPTIONS
$1$.
-R, --rounds=NUMBER
Use NUMBER rounds. This argument is ignored if the method
choosen does not support variable rounds. For the OpenBSD Blowfish
chosen does not support variable rounds. For the OpenBSD Blowfish
method this is the logarithm of the number of rounds.
-m, --method=TYPE
Compute the password using the TYPE method. If TYPE is 'help'

View File

@ -12,7 +12,7 @@
* Use as follows:
* # inotifyd /user/space/agent dir/or/file/being/watched[:mask] ...
*
* When a filesystem event matching the specified mask is occured on specified file (or directory)
* When a filesystem event matching the specified mask is occurred on specified file (or directory)
* a userspace agent is spawned and given the following parameters:
* $1. actual event(s)
* $2. file (or directory) name

View File

@ -267,7 +267,7 @@ struct globals {
/* flines[] are lines read from stdin, each in malloc'ed buffer.
* Line numbers are stored as uint32_t prepended to each line.
* Pointer is adjusted so that flines[i] points directly past
* line number. Accesor: */
* line number. Accessor: */
#define MEMPTR(p) ((char*)(p) - 4)
#define LINENO(p) (*(uint32_t*)((p) - 4))

View File

@ -397,7 +397,7 @@ static void run_command(char *const *cmd, resource_t *resp)
}
/* Have signals kill the child but not self (if possible). */
//TODO: just block all sigs? and reenable them in the very end in main?
//TODO: just block all sigs? and re-enable them in the very end in main?
interrupt_signal = signal(SIGINT, SIG_IGN);
quit_signal = signal(SIGQUIT, SIG_IGN);

View File

@ -75,7 +75,7 @@ config FEATURE_INSMOD_KSYMOOPS_SYMBOLS
depends on FEATURE_2_4_MODULES && (INSMOD || MODPROBE)
help
By adding module symbols to the kernel symbol table, Oops messages
occuring within kernel modules can be properly debugged. By enabling
occurring within kernel modules can be properly debugged. By enabling
this feature, module symbols will always be added to the kernel symbol
table for proper debugging support. If you are not interested in
Oops messages from kernel modules, say N.

View File

@ -104,7 +104,7 @@ static void modinfo(const char *path, const char *version,
char *after_pattern;
ptr = memchr(ptr, *pattern, len - (ptr - (char*)the_module));
if (ptr == NULL) /* no occurance left, done */
if (ptr == NULL) /* no occurrence left, done */
break;
after_pattern = is_prefixed_with(ptr, pattern);
if (after_pattern && *after_pattern == '=') {

View File

@ -169,7 +169,7 @@ static char* find_keyword(char *ptr, size_t len, const char *word)
/* search for the first char in word */
ptr = memchr(ptr, word[0], len);
if (ptr == NULL) /* no occurance left, done */
if (ptr == NULL) /* no occurrence left, done */
break;
after_word = is_prefixed_with(ptr, word);
if (after_word)
@ -411,7 +411,7 @@ static FAST_FUNC int fileAction(const char *pathname,
if (load_module(pathname, module_load_options) == 0) {
/* Load was successful, there is nothing else to do.
* This can happen ONLY for "top-level" module load,
* not a dep, because deps dont do dirscan. */
* not a dep, because deps don't do dirscan. */
exit(EXIT_SUCCESS);
}
}

View File

@ -360,7 +360,7 @@ RDATA a variable length string of octets that describes the resource.
In order to reduce the size of messages, domain names coan be compressed.
An entire domain name or a list of labels at the end of a domain name
is replaced with a pointer to a prior occurance of the same name.
is replaced with a pointer to a prior occurrence of the same name.
The pointer takes the form of a two octet sequence:
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

View File

@ -55,7 +55,7 @@
*
* - 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and
* Shmulik Hen <shmulik.hen at intel dot com>
* - Moved setting the slave's mac address and openning it, from
* - Moved setting the slave's mac address and opening it, from
* the application to the driver. This enables support of modes
* that need to use the unique mac address of each slave.
* The driver also takes care of closing the slave and restoring its

View File

@ -191,7 +191,7 @@ static void handle_accept(isrv_state_t *state, int fd)
DPRINTF("new_peer(%d)", newfd);
n = state->new_peer(state, newfd);
if (n)
remove_peer(state, n); /* unsuccesful peer start */
remove_peer(state, n); /* unsuccessful peer start */
}
static void handle_fd_set(isrv_state_t *state, fd_set *fds, int (*h)(int, void **))

View File

@ -459,7 +459,7 @@ create new one, and bind() it. TODO */
so I don't feel bad.
The *real* question is why BFD sockets wasn't designed to allow listens for
connections *from* specific hosts/ports, instead of requiring the caller to
accept the connection and then reject undesireable ones by closing.
accept the connection and then reject undesirable ones by closing.
In other words, we need a TCP MSG_PEEK. */
/* bbox: removed most of it */
lcladdr = xmalloc_sockaddr2dotted(&ouraddr->u.sa);
@ -502,7 +502,7 @@ static int udptest(void)
/* use the tcp-ping trick: try connecting to a normally refused port, which
causes us to block for the time that SYN gets there and RST gets back.
Not completely reliable, but it *does* mostly work. */
/* Set a temporary connect timeout, so packet filtration doesnt cause
/* Set a temporary connect timeout, so packet filtration doesn't cause
us to hang forever, and hit it */
o_wait = 5; /* enough that we'll notice?? */
rr = xsocket(ouraddr->u.sa.sa_family, SOCK_STREAM, 0);

View File

@ -393,7 +393,7 @@ struct globals {
* too big and we will step. I observed it with -6.
*
* OTOH, setting precision_sec far too small would result in futile
* attempts to syncronize to an unachievable precision.
* attempts to synchronize to an unachievable precision.
*
* -6 is 1/64 sec, -7 is 1/128 sec and so on.
* -8 is 1/256 ~= 0.003906 (worked well for me --vda)
@ -754,7 +754,7 @@ reset_peer_stats(peer_t *p, double offset)
bool small_ofs = fabs(offset) < STEP_THRESHOLD;
/* Used to set p->filter_datapoint[i].d_dispersion = MAXDISP
* and clear reachable bits, but this proved to be too agressive:
* and clear reachable bits, but this proved to be too aggressive:
* after step (tested with suspending laptop for ~30 secs),
* this caused all previous data to be considered invalid,
* making us needing to collect full ~8 datapoints per peer
@ -1715,7 +1715,7 @@ update_local_clock(peer_t *p)
* It looks like Linux kernel's PLL is far too gentle in changing
* tmx.freq in response to clock offset. Offset keeps growing
* and eventually we fall back to smaller poll intervals.
* We can make correction more agressive (about x2) by supplying
* We can make correction more aggressive (about x2) by supplying
* PLL time constant which is one less than the real one.
* To be on a safe side, let's do it only if offset is significantly
* larger than jitter.

View File

@ -478,7 +478,7 @@ static void sendping_tail(void (*sp)(int), int size_pkt)
} else { /* -c NN, and all NN are sent (and no deadline) */
/* Wait for the last ping to come back.
* -W timeout: wait for a response in seconds.
* Affects only timeout in absense of any responses,
* Affects only timeout in absence of any responses,
* otherwise ping waits for two RTTs. */
unsigned expire = timeout;
@ -712,7 +712,7 @@ static void ping4(len_and_sockaddr *lsa)
if (opt_ttl != 0) {
setsockopt_int(pingsock, IPPROTO_IP, IP_TTL, opt_ttl);
/* above doesnt affect packets sent to bcast IP, so... */
/* above doesn't affect packets sent to bcast IP, so... */
setsockopt_int(pingsock, IPPROTO_IP, IP_MULTICAST_TTL, opt_ttl);
}

View File

@ -683,7 +683,7 @@ prog
-E
no special environment. Do not set up TCP-related environment variables.
-v
verbose. Print verbose messsages to standard output.
verbose. Print verbose messages to standard output.
-vv
more verbose. Print more verbose messages to standard output.
* no difference between -v and -vv in busyboxed version

View File

@ -1460,7 +1460,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
already_waited_sec += (unsigned)monotonic_sec() - timestamp_before_wait;
continue;
}
/* Else: an error occured, panic! */
/* Else: an error occurred, panic! */
bb_perror_msg_and_die("select");
}
}

View File

@ -361,7 +361,7 @@ int dhcprelay_main(int argc, char **argv)
// which the reply must be sent (i.e., the host or router interface
// connected to the same network as the BOOTP client). If the content
// of the 'giaddr' field does not match one of the relay agent's
// directly-connected logical interfaces, the BOOTREPLY messsage MUST be
// directly-connected logical interfaces, the BOOTREPLY message MUST be
// silently discarded.
if (udhcp_read_interface(iface_list[i], NULL, &dhcp_msg.gateway_nip, NULL)) {
/* Fall back to our IP on server iface */

View File

@ -138,7 +138,7 @@ int vconfig_main(int argc, char **argv)
/* I suppose one could try to combine some of the function calls below,
* since ifr.u.flag, ifr.u.VID, and ifr.u.skb_priority are all same-sized
* (unsigned) int members of a unions. But because of the range checking,
* doing so wouldn't save that much space and would also make maintainence
* doing so wouldn't save that much space and would also make maintenance
* more of a pain.
*/
if (ifr.cmd == SET_VLAN_FLAG_CMD) {

View File

@ -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;

View File

@ -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}

View File

@ -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

View File

@ -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}

View File

@ -24,7 +24,7 @@
//config: default y
//config: depends on LOGREAD
//config: help
//config: 'logread' ouput to slow serial terminals can have
//config: 'logread' output to slow serial terminals can have
//config: side effects on syslog because of the semaphore.
//config: This option make logread to double buffer copy
//config: from circular buffer, minimizing semaphore
@ -159,7 +159,7 @@ int logread_main(int argc UNUSED_PARAM, char **argv)
cur, shbuf_tail, shbuf_size);
if (!(follow & 1)) { /* not -f */
/* if -F, "convert" it to -f, so that we dont
/* if -F, "convert" it to -f, so that we don't
* dump the entire buffer on each iteration
*/
follow >>= 1;

View File

@ -29,7 +29,7 @@ pwd=`$pwd`
testing "readlink -f on a file" "readlink -f ./$TESTFILE" "$pwd/$TESTFILE\n" "" ""
testing "readlink -f on a link" "readlink -f ./$TESTLINK" "$pwd/$TESTFILE\n" "" ""
testing "readlink -f on an invalid link" "readlink -f ./$FAILLINK" "" "" ""
testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$pwd/$TESTFILE\n" "" ""
testing "readlink -f on a weird dir" "readlink -f $TESTDIR/../$TESTFILE" "$pwd/$TESTFILE\n" "" ""
# clean up

View File

@ -35,7 +35,7 @@
#include "libbb.h"
#include "unicode.h"
/* We often use "unsigned" intead of "int", it's easier to div on most CPUs */
/* We often use "unsigned" instead of "int", it's easier to div on most CPUs */
#define THURSDAY 4 /* for reformation */
#define SATURDAY 6 /* 1 Jan 1 was a Saturday */

View File

@ -167,7 +167,7 @@ static void from_sys_clock(const char **pp_rtcname, int utc)
* On x86, even though code does set hw clock within <1ms of exact
* whole seconds, apparently hw clock (at least on some machines)
* doesn't reset internal fractional seconds to 0,
* making all this a pointless excercise.
* making all this a pointless exercise.
*/
/* If we see that we are N usec away from whole second,
* we'll sleep for N-ADJ usecs. ADJ corrects for the fact

View File

@ -141,7 +141,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv)
retval = EXIT_FAILURE;
}
/* No need to check for errors outputing to stderr since, if it
/* No need to check for errors outputting to stderr since, if it
* was used, the HAD_ERROR label was reached and retval was set. */
return retval;

View File

@ -183,7 +183,7 @@ So there's a step that needs to be sort of atomic but can't be as a shell
script. (You can work around this with static linking or very carefully laid
out paths and sequencing, but it's brittle, ugly, and non-obvious.)
2) The "find | rm" bit will acually delete everything because the mount points
2) The "find | rm" bit will actually delete everything because the mount points
still show up (even if their contents don't), and rm -rf will then happily zap
that. So the first line is an oversimplification of what you need to do _not_
to descend into other filesystems and delete their contents.

View File

@ -137,7 +137,7 @@ anchor:
if (type != 2) /* TAG_ID_AVDP */
goto found;
/* get desriptor list address and block count */
/* get descriptor list address and block count */
count = le32_to_cpu(vd->type.anchor.length) / bs;
loc = le32_to_cpu(vd->type.anchor.location);
dbg("0x%x descriptors starting at logical secor 0x%x", count, loc);