Skip to content

Commit

Permalink
Spelling fixes in comments, documentation, tests and examples
Browse files Browse the repository at this point in the history
By klemens <[email protected]>

Signed-off-by: Denys Vlasenko <[email protected]>
  • Loading branch information
Denys Vlasenko committed Apr 17, 2017
1 parent d85352b commit 10ad622
Show file tree
Hide file tree
Showing 41 changed files with 80 additions and 80 deletions.
26 changes: 13 additions & 13 deletions archival/dpkg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 '(' */
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
Expand All @@ -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");
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion archival/libarchive/decompress_bunzip2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions archival/libarchive/unxz/xz_dec_lzma2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions archival/tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion coreutils/dos2unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>.
* All rights reserved.
Expand Down
10 changes: 5 additions & 5 deletions docs/sigint.htm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

</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>
Expand Down Expand Up @@ -366,7 +366,7 @@ <H3>So everything is well with WCE?</H3>
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
Expand Down Expand Up @@ -446,7 +446,7 @@ <H3>How to be a proper program</H3>
<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.

Expand All @@ -466,7 +466,7 @@ <H3>How to be a proper program</H3>
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.
Expand Down Expand Up @@ -565,7 +565,7 @@ <H3>Appendix 1 - table of implementation choices</H3>
<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>
Expand Down
2 changes: 1 addition & 1 deletion docs/style-guide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions editors/sed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,=,{,} */
Expand Down Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion examples/var_service/dhcp_if/dhcp_handler
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion findutils/find.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions findutils/grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libbb/getopt32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions libpwdgrp/pwd_grp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion loginutils/cryptpw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion miscutils/inotifyd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion miscutils/less.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion miscutils/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion modutils/Config.src
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion modutils/modinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 == '=') {
Expand Down
4 changes: 2 additions & 2 deletions modutils/modprobe-small.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion networking/dnsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Expand Down
Loading

0 comments on commit 10ad622

Please sign in to comment.